mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-26 15:36:48 +00:00
Avoid redundant lowerCase call
This commit is contained in:
parent
ba69146ced
commit
228a0dc723
2 changed files with 2 additions and 5 deletions
|
@ -391,10 +391,8 @@ std::string CSMWorld::Columns::getName (ColumnId column)
|
||||||
|
|
||||||
int CSMWorld::Columns::getId (const std::string& name)
|
int CSMWorld::Columns::getId (const std::string& name)
|
||||||
{
|
{
|
||||||
std::string name2 = Misc::StringUtils::lowerCase (name);
|
|
||||||
|
|
||||||
for (int i=0; sNames[i].mName; ++i)
|
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 sNames[i].mId;
|
||||||
|
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -354,9 +354,8 @@ CSMWorld::LandTextureIdTable::ImportResults CSMWorld::LandTextureIdTable::import
|
||||||
for (int i = 0; i < idCollection()->getSize(); ++i)
|
for (int i = 0; i < idCollection()->getSize(); ++i)
|
||||||
{
|
{
|
||||||
auto& record = static_cast<const Record<LandTexture>&>(idCollection()->getRecord(i));
|
auto& record = static_cast<const Record<LandTexture>&>(idCollection()->getRecord(i));
|
||||||
std::string texture = Misc::StringUtils::lowerCase(record.get().mTexture);
|
|
||||||
if (record.isModified())
|
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)
|
for (const std::string& id : ids)
|
||||||
|
|
Loading…
Reference in a new issue