Minor change to improve generated STL code (only tested with MSVC 2012). More details in forum post https://forum.openmw.org/viewtopic.php?f=6&t=2153#p24065

pull/178/head
cc9cii 11 years ago
parent 1ce60fa13b
commit 9713873538

@ -267,10 +267,11 @@ namespace sh
MaterialInstance* Factory::searchInstance (const std::string& name) MaterialInstance* Factory::searchInstance (const std::string& name)
{ {
if (mMaterials.find(name) != mMaterials.end()) MaterialMap::iterator it = mMaterials.find(name);
return &mMaterials.find(name)->second; if (it != mMaterials.end())
return &(it->second);
return NULL; else
return NULL;
} }
MaterialInstance* Factory::findInstance (const std::string& name) MaterialInstance* Factory::findInstance (const std::string& name)
@ -434,8 +435,9 @@ namespace sh
std::string Factory::retrieveTextureAlias (const std::string& name) std::string Factory::retrieveTextureAlias (const std::string& name)
{ {
if (mTextureAliases.find(name) != mTextureAliases.end()) TextureAliasMap::iterator it = mTextureAliases.find(name);
return mTextureAliases[name]; if (it != mTextureAliases.end())
return it->second;
else else
return ""; return "";
} }

Loading…
Cancel
Save