mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-30 20:41:23 +00:00
Merge branch 'const_moar' into 'master'
Sprinkle some const ref See merge request OpenMW/openmw!963
This commit is contained in:
commit
4b98d460da
8 changed files with 8 additions and 8 deletions
|
@ -543,7 +543,7 @@ bool ContentSelectorModel::ContentModel::isChecked(const QString& filepath) cons
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool ContentSelectorModel::ContentModel::isEnabled (QModelIndex index) const
|
bool ContentSelectorModel::ContentModel::isEnabled (const QModelIndex& index) const
|
||||||
{
|
{
|
||||||
return (flags(index) & Qt::ItemIsEnabled);
|
return (flags(index) & Qt::ItemIsEnabled);
|
||||||
}
|
}
|
||||||
|
|
|
@ -52,7 +52,7 @@ namespace ContentSelectorModel
|
||||||
EsmFile *item(int row);
|
EsmFile *item(int row);
|
||||||
QStringList gameFiles() const;
|
QStringList gameFiles() const;
|
||||||
|
|
||||||
bool isEnabled (QModelIndex index) const;
|
bool isEnabled (const QModelIndex& index) const;
|
||||||
bool isChecked(const QString &filepath) const;
|
bool isChecked(const QString &filepath) const;
|
||||||
bool setCheckState(const QString &filepath, bool isChecked);
|
bool setCheckState(const QString &filepath, bool isChecked);
|
||||||
void setContentList(const QStringList &fileList);
|
void setContentList(const QStringList &fileList);
|
||||||
|
|
|
@ -62,7 +62,7 @@ namespace DetourNavigator
|
||||||
return mImpl.isEmpty();
|
return mImpl.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CachedRecastMeshManager::reportNavMeshChange(Version recastMeshVersion, Version navMeshVersion)
|
void CachedRecastMeshManager::reportNavMeshChange(const Version& recastMeshVersion, const Version& navMeshVersion)
|
||||||
{
|
{
|
||||||
mImpl.reportNavMeshChange(recastMeshVersion, navMeshVersion);
|
mImpl.reportNavMeshChange(recastMeshVersion, navMeshVersion);
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace DetourNavigator
|
||||||
|
|
||||||
bool isEmpty() const;
|
bool isEmpty() const;
|
||||||
|
|
||||||
void reportNavMeshChange(Version recastMeshVersion, Version navMeshVersion);
|
void reportNavMeshChange(const Version& recastMeshVersion, const Version& navMeshVersion);
|
||||||
|
|
||||||
Version getVersion() const;
|
Version getVersion() const;
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ namespace DetourNavigator
|
||||||
return mObjects.empty();
|
return mObjects.empty();
|
||||||
}
|
}
|
||||||
|
|
||||||
void RecastMeshManager::reportNavMeshChange(Version recastMeshVersion, Version navMeshVersion)
|
void RecastMeshManager::reportNavMeshChange(const Version& recastMeshVersion, const Version& navMeshVersion)
|
||||||
{
|
{
|
||||||
if (recastMeshVersion.mGeneration != mGeneration)
|
if (recastMeshVersion.mGeneration != mGeneration)
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -50,7 +50,7 @@ namespace DetourNavigator
|
||||||
|
|
||||||
bool isEmpty() const;
|
bool isEmpty() const;
|
||||||
|
|
||||||
void reportNavMeshChange(Version recastMeshVersion, Version navMeshVersion);
|
void reportNavMeshChange(const Version& recastMeshVersion, const Version& navMeshVersion);
|
||||||
|
|
||||||
Version getVersion() const;
|
Version getVersion() const;
|
||||||
|
|
||||||
|
|
|
@ -26,7 +26,7 @@ namespace Interpreter{
|
||||||
return a.length() > b.length();
|
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;
|
unsigned int start = 0;
|
||||||
std::ostringstream retval;
|
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);
|
size_t pos = str.rfind(substr);
|
||||||
if (pos == std::string::npos)
|
if (pos == std::string::npos)
|
||||||
|
|
Loading…
Reference in a new issue