Sprinkle some const ref

dont-compose-content
jvoisin 4 years ago
parent 7d8949ec3f
commit 9db7d0278a

@ -543,7 +543,7 @@ bool ContentSelectorModel::ContentModel::isChecked(const QString& filepath) cons
return false;
}
bool ContentSelectorModel::ContentModel::isEnabled (QModelIndex index) const
bool ContentSelectorModel::ContentModel::isEnabled (const QModelIndex& index) const
{
return (flags(index) & Qt::ItemIsEnabled);
}

@ -52,7 +52,7 @@ namespace ContentSelectorModel
EsmFile *item(int row);
QStringList gameFiles() const;
bool isEnabled (QModelIndex index) const;
bool isEnabled (const QModelIndex& index) const;
bool isChecked(const QString &filepath) const;
bool setCheckState(const QString &filepath, bool isChecked);
void setContentList(const QStringList &fileList);

@ -62,7 +62,7 @@ namespace DetourNavigator
return mImpl.isEmpty();
}
void CachedRecastMeshManager::reportNavMeshChange(Version recastMeshVersion, Version navMeshVersion)
void CachedRecastMeshManager::reportNavMeshChange(const Version& recastMeshVersion, const Version& navMeshVersion)
{
mImpl.reportNavMeshChange(recastMeshVersion, navMeshVersion);
}

@ -26,7 +26,7 @@ namespace DetourNavigator
bool isEmpty() const;
void reportNavMeshChange(Version recastMeshVersion, Version navMeshVersion);
void reportNavMeshChange(const Version& recastMeshVersion, const Version& navMeshVersion);
Version getVersion() const;

@ -83,7 +83,7 @@ namespace DetourNavigator
return mObjects.empty();
}
void RecastMeshManager::reportNavMeshChange(Version recastMeshVersion, Version navMeshVersion)
void RecastMeshManager::reportNavMeshChange(const Version& recastMeshVersion, const Version& navMeshVersion)
{
if (recastMeshVersion.mGeneration != mGeneration)
return;

@ -50,7 +50,7 @@ namespace DetourNavigator
bool isEmpty() const;
void reportNavMeshChange(Version recastMeshVersion, Version navMeshVersion);
void reportNavMeshChange(const Version& recastMeshVersion, const Version& navMeshVersion);
Version getVersion() const;

@ -26,7 +26,7 @@ namespace Interpreter{
return a.length() > b.length();
}
std::string fixDefinesReal(std::string text, bool dialogue, Context& context)
static std::string fixDefinesReal(const std::string& text, bool dialogue, Context& context)
{
unsigned int start = 0;
std::ostringstream retval;

@ -290,7 +290,7 @@ public:
}
}
static inline void replaceLast(std::string& str, std::string substr, std::string with)
static inline void replaceLast(std::string& str, const std::string& substr, const std::string& with)
{
size_t pos = str.rfind(substr);
if (pos == std::string::npos)

Loading…
Cancel
Save