mirror of
https://gitlab.com/OpenMW/openmw.git
synced 2025-01-29 18:32:36 +00:00
Use std::set instead of std::map
This commit is contained in:
parent
f9e2fd0f3d
commit
e105202ee2
@ -21,7 +21,7 @@ namespace MWGui
|
|||||||
if (base.getClass().getEnchantment(base) != "")
|
if (base.getClass().getEnchantment(base) != "")
|
||||||
mFlags |= Flag_Enchanted;
|
mFlags |= Flag_Enchanted;
|
||||||
|
|
||||||
static std::map<std::string, bool> boundItemIDCache;
|
static std::set<std::string> boundItemIDCache;
|
||||||
|
|
||||||
// If this is empty then we haven't executed the GMST cache logic yet; or there isn't any sMagicBound* GMST's for some reason
|
// If this is empty then we haven't executed the GMST cache logic yet; or there isn't any sMagicBound* GMST's for some reason
|
||||||
if (boundItemIDCache.empty())
|
if (boundItemIDCache.empty())
|
||||||
@ -43,7 +43,7 @@ namespace MWGui
|
|||||||
std::string currentGMSTValue = currentSetting.getString();
|
std::string currentGMSTValue = currentSetting.getString();
|
||||||
Misc::StringUtils::toLower(currentGMSTValue);
|
Misc::StringUtils::toLower(currentGMSTValue);
|
||||||
|
|
||||||
boundItemIDCache[currentGMSTValue] = true;
|
boundItemIDCache.insert(currentGMSTValue);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user