1
0
mirror of https://foundry.openuru.org/gitblit/r/CWE-ou-minkata.git synced 2025-07-17 10:52:46 +00:00

Merge pull request #373 from Hoikas/linking-perf

Low-Hanging Linking Performance
This commit is contained in:
Branan Purvine-Riley
2013-12-21 16:58:34 -08:00
4 changed files with 24 additions and 23 deletions

View File

@ -169,9 +169,11 @@ bool plRegistryKeyList::SetKeyUnused(plKeyImp* key, LoadStatus& loadStatusChange
// Fixed Keys use ID == 0
if (id == 0)
hsAssert(key->GetUoid().GetLocation() == plLocation::kGlobalFixedLoc, "key id == 0 but not fixed?");
else if (id < fKeys.size()) {
if (fKeys[id]->GetUoid().GetObjectID() == id)
foundKey = fKeys[id];
// Recall that vectors are index zero but normal object IDs are index one...
else if (id <= fKeys.size()) {
if (fKeys[id-1]->GetUoid().GetObjectID() == id)
foundKey = fKeys[id-1];
}
// Last chance: do a slow name search for that key.