mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-02-23 06:41:08 +00:00
Doors: small key search optimizations
This commit is contained in:
parent
188424d5d3
commit
cab51d26cc
@ -132,6 +132,8 @@ namespace MWClass
|
|||||||
|
|
||||||
// make key id lowercase
|
// make key id lowercase
|
||||||
std::string keyId = ptr.getCellRef().getKey();
|
std::string keyId = ptr.getCellRef().getKey();
|
||||||
|
if (!keyId.empty())
|
||||||
|
{
|
||||||
Misc::StringUtils::lowerCaseInPlace(keyId);
|
Misc::StringUtils::lowerCaseInPlace(keyId);
|
||||||
for (MWWorld::ConstContainerStoreIterator it = invStore.cbegin(); it != invStore.cend(); ++it)
|
for (MWWorld::ConstContainerStoreIterator it = invStore.cbegin(); it != invStore.cend(); ++it)
|
||||||
{
|
{
|
||||||
@ -141,6 +143,8 @@ namespace MWClass
|
|||||||
{
|
{
|
||||||
hasKey = true;
|
hasKey = true;
|
||||||
keyName = it->getClass().getName(*it);
|
keyName = it->getClass().getName(*it);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user