mirror of
https://github.com/OpenMW/openmw.git
synced 2025-02-06 11:15:33 +00:00
Don't use const
for objects returned by value.
This prevents the usage of std::move semantics, and makes clang-tidy sad.
This commit is contained in:
parent
291195872e
commit
d4e3575f1d
5 changed files with 6 additions and 6 deletions
|
@ -121,7 +121,7 @@ namespace CSMWorld
|
|||
return SceneUtil::getActorSkeleton(firstPerson, mFemale, beast, werewolf);
|
||||
}
|
||||
|
||||
const std::string ActorAdapter::ActorData::getPart(ESM::PartReferenceType index) const
|
||||
const std::string& ActorAdapter::ActorData::getPart(ESM::PartReferenceType index) const
|
||||
{
|
||||
auto it = mParts.find(index);
|
||||
if (it == mParts.end())
|
||||
|
@ -131,7 +131,7 @@ namespace CSMWorld
|
|||
if (mFemale)
|
||||
{
|
||||
// Note: we should use male parts for females as fallback
|
||||
const std::string femalePart = mRaceData->getFemalePart(index);
|
||||
const std::string& femalePart = mRaceData->getFemalePart(index);
|
||||
if (!femalePart.empty())
|
||||
return femalePart;
|
||||
}
|
||||
|
|
|
@ -93,7 +93,7 @@ namespace CSMWorld
|
|||
/// Returns the skeleton the actor should use for attaching parts to
|
||||
std::string getSkeleton() const;
|
||||
/// Retrieves the associated actor part
|
||||
const std::string getPart(ESM::PartReferenceType index) const;
|
||||
const std::string& getPart(ESM::PartReferenceType index) const;
|
||||
/// Checks if the actor has a data dependency
|
||||
bool hasDependency(const std::string& id) const;
|
||||
|
||||
|
|
|
@ -521,7 +521,7 @@ std::string OMW::Engine::loadSettings (Settings::Manager & settings)
|
|||
throw std::runtime_error ("No default settings file found! Make sure the file \"defaults.bin\" was properly installed.");
|
||||
|
||||
// load user settings if they exist
|
||||
const std::string settingspath = (mCfgMgr.getUserConfigPath() / "settings.cfg").string();
|
||||
std::string settingspath = (mCfgMgr.getUserConfigPath() / "settings.cfg").string();
|
||||
if (boost::filesystem::exists(settingspath))
|
||||
settings.loadUser(settingspath);
|
||||
|
||||
|
|
|
@ -27,7 +27,7 @@ namespace DetourNavigator
|
|||
|
||||
std::optional<RemovedRecastMeshObject> CachedRecastMeshManager::removeObject(const ObjectId id)
|
||||
{
|
||||
const auto object = mImpl.removeObject(id);
|
||||
auto object = mImpl.removeObject(id);
|
||||
if (object)
|
||||
mCached.lock()->reset();
|
||||
return object;
|
||||
|
|
|
@ -248,7 +248,7 @@ namespace DetourNavigator
|
|||
const auto tile = tiles.find(tilePosition);
|
||||
if (tile == tiles.end())
|
||||
return std::optional<RemovedRecastMeshObject>();
|
||||
const auto tileResult = tile->second->removeObject(id);
|
||||
auto tileResult = tile->second->removeObject(id);
|
||||
if (tile->second->isEmpty())
|
||||
{
|
||||
tiles.erase(tile);
|
||||
|
|
Loading…
Reference in a new issue