1
0
Fork 0
mirror of https://github.com/OpenMW/openmw.git synced 2025-03-31 22:36:40 +00:00

removes lowerCaseInPlace (#3217)

This PR removes unneeded `lowerCaseInPlace` calls in in a hot path of `objectpaging.cpp` that are no longer necessary after PR #3197. In addition, I have been informed that these changes should by coincidence address a compiler specific compilation error we currently experience.
This commit is contained in:
Bo Svensson 2021-11-04 21:20:06 +00:00 committed by GitHub
parent cd946ea35a
commit 0371072631
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 1 additions and 3 deletions

View file

@ -428,7 +428,6 @@ namespace MWRender
continue;
if (std::find(cell->mMovedRefs.begin(), cell->mMovedRefs.end(), ref.mRefNum) != cell->mMovedRefs.end()) continue;
Misc::StringUtils::lowerCaseInPlace(ref.mRefID);
int type = store.findStatic(ref.mRefID);
if (!typeFilter(type,size>=2)) continue;
if (deleted) { refs.erase(ref.mRefNum); continue; }
@ -444,7 +443,6 @@ namespace MWRender
for (auto [ref, deleted] : cell->mLeasedRefs)
{
if (deleted) { refs.erase(ref.mRefNum); continue; }
Misc::StringUtils::lowerCaseInPlace(ref.mRefID);
int type = store.findStatic(ref.mRefID);
if (!typeFilter(type,size>=2)) continue;
refs[ref.mRefNum] = std::move(ref);

View file

@ -142,5 +142,5 @@ std::string Misc::ResourceHelpers::correctActorModelPath(const std::string &resP
bool Misc::ResourceHelpers::isHiddenMarker(std::string_view id)
{
return id == "prisonmarker" || id == "divinemarker" || id == "templemarker" || id == "northmarker";
return Misc::StringUtils::ciEqual(id, "prisonmarker") || Misc::StringUtils::ciEqual(id, "divinemarker") || Misc::StringUtils::ciEqual(id, "templemarker") || Misc::StringUtils::ciEqual(id, "northmarker");
}