forked from teamnwah/openmw-tes3coop
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
This commit is contained in:
parent
1ce60fa13b
commit
9713873538
1 changed files with 8 additions and 6 deletions
14
extern/shiny/Main/Factory.cpp
vendored
14
extern/shiny/Main/Factory.cpp
vendored
|
@ -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…
Reference in a new issue