mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-10 03:39:55 +00:00
Avoid redundant lowerCase call
This commit is contained in:
parent
ba69146ced
commit
228a0dc723
@ -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;
|
||||
|
@ -354,9 +354,8 @@ CSMWorld::LandTextureIdTable::ImportResults CSMWorld::LandTextureIdTable::import
|
||||
for (int i = 0; i < idCollection()->getSize(); ++i)
|
||||
{
|
||||
auto& record = static_cast<const Record<LandTexture>&>(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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user