diff --git a/apps/opencs/model/world/commanddispatcher.cpp b/apps/opencs/model/world/commanddispatcher.cpp index 0b1af0e84..0bef1bb4e 100644 --- a/apps/opencs/model/world/commanddispatcher.cpp +++ b/apps/opencs/model/world/commanddispatcher.cpp @@ -93,7 +93,7 @@ void CSMWorld::CommandDispatcher::setEditLock (bool locked) void CSMWorld::CommandDispatcher::setSelection (const std::vector& selection) { mSelection = selection; - std::for_each (mSelection.begin(), mSelection.end(), Misc::StringUtils::toLower); + std::for_each (mSelection.begin(), mSelection.end(), Misc::StringUtils::toLowerStr); std::sort (mSelection.begin(), mSelection.end()); } diff --git a/apps/opencs/model/world/scriptcontext.cpp b/apps/opencs/model/world/scriptcontext.cpp index f644ad37a..33025bd1c 100644 --- a/apps/opencs/model/world/scriptcontext.cpp +++ b/apps/opencs/model/world/scriptcontext.cpp @@ -93,7 +93,7 @@ bool CSMWorld::ScriptContext::isId (const std::string& name) const { mIds = mData.getIds(); - std::for_each (mIds.begin(), mIds.end(), &Misc::StringUtils::toLower); + std::for_each (mIds.begin(), mIds.end(), &Misc::StringUtils::toLowerStr); std::sort (mIds.begin(), mIds.end()); mIdsUpdated = true; diff --git a/components/misc/stringops.hpp b/components/misc/stringops.hpp index 72c027530..ce27d5fb2 100644 --- a/components/misc/stringops.hpp +++ b/components/misc/stringops.hpp @@ -100,6 +100,11 @@ public: return inout; } + static std::string &toLowerStr(std::string &inout) + { + return toLower(inout); + } + /// Returns lower case copy of input string static std::string lowerCase(const std::string &in) {