diff --git a/apps/opencs/model/world/columns.cpp b/apps/opencs/model/world/columns.cpp index 6f253a3513..f61ae986d5 100644 --- a/apps/opencs/model/world/columns.cpp +++ b/apps/opencs/model/world/columns.cpp @@ -391,10 +391,8 @@ std::string CSMWorld::Columns::getName (ColumnId column) int CSMWorld::Columns::getId (const std::string& name) { - std::string name2 = Misc::StringUtils::lowerCase (name); - for (int i=0; sNames[i].mName; ++i) - if (Misc::StringUtils::ciEqual(std::string_view(sNames[i].mName), name2)) + if (Misc::StringUtils::ciEqual(std::string_view(sNames[i].mName), name)) return sNames[i].mId; return -1; diff --git a/apps/opencs/model/world/idtable.cpp b/apps/opencs/model/world/idtable.cpp index 75213aab84..51cd6522e7 100644 --- a/apps/opencs/model/world/idtable.cpp +++ b/apps/opencs/model/world/idtable.cpp @@ -354,9 +354,8 @@ CSMWorld::LandTextureIdTable::ImportResults CSMWorld::LandTextureIdTable::import for (int i = 0; i < idCollection()->getSize(); ++i) { auto& record = static_cast&>(idCollection()->getRecord(i)); - std::string texture = Misc::StringUtils::lowerCase(record.get().mTexture); if (record.isModified()) - reverseLookupMap.emplace(texture, idCollection()->getId(i)); + reverseLookupMap.emplace(Misc::StringUtils::lowerCase(record.get().mTexture), idCollection()->getId(i)); } for (const std::string& id : ids)