diff --git a/components/contentselector/model/contentmodel.cpp b/components/contentselector/model/contentmodel.cpp index e51c1809a9..141ad13517 100644 --- a/components/contentselector/model/contentmodel.cpp +++ b/components/contentselector/model/contentmodel.cpp @@ -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); } diff --git a/components/contentselector/model/contentmodel.hpp b/components/contentselector/model/contentmodel.hpp index 030865b35a..d245a0dcbf 100644 --- a/components/contentselector/model/contentmodel.hpp +++ b/components/contentselector/model/contentmodel.hpp @@ -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); diff --git a/components/detournavigator/cachedrecastmeshmanager.cpp b/components/detournavigator/cachedrecastmeshmanager.cpp index 2788b80461..4666b66a83 100644 --- a/components/detournavigator/cachedrecastmeshmanager.cpp +++ b/components/detournavigator/cachedrecastmeshmanager.cpp @@ -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); } diff --git a/components/detournavigator/cachedrecastmeshmanager.hpp b/components/detournavigator/cachedrecastmeshmanager.hpp index ea55348f70..96604c3628 100644 --- a/components/detournavigator/cachedrecastmeshmanager.hpp +++ b/components/detournavigator/cachedrecastmeshmanager.hpp @@ -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; diff --git a/components/detournavigator/recastmeshmanager.cpp b/components/detournavigator/recastmeshmanager.cpp index bfc0409a51..e79d58de9d 100644 --- a/components/detournavigator/recastmeshmanager.cpp +++ b/components/detournavigator/recastmeshmanager.cpp @@ -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; diff --git a/components/detournavigator/recastmeshmanager.hpp b/components/detournavigator/recastmeshmanager.hpp index 5922821f26..850865b95e 100644 --- a/components/detournavigator/recastmeshmanager.hpp +++ b/components/detournavigator/recastmeshmanager.hpp @@ -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; diff --git a/components/interpreter/defines.cpp b/components/interpreter/defines.cpp index d2e7067c6c..48d2ceaa45 100644 --- a/components/interpreter/defines.cpp +++ b/components/interpreter/defines.cpp @@ -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; diff --git a/components/misc/stringops.hpp b/components/misc/stringops.hpp index 9f3dfe7c5f..2a865606fd 100644 --- a/components/misc/stringops.hpp +++ b/components/misc/stringops.hpp @@ -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)