mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 09:15:38 +00:00
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)
|
||||
{
|
||||
if (mMaterials.find(name) != mMaterials.end())
|
||||
return &mMaterials.find(name)->second;
|
||||
|
||||
return NULL;
|
||||
MaterialMap::iterator it = mMaterials.find(name);
|
||||
if (it != mMaterials.end())
|
||||
return &(it->second);
|
||||
else
|
||||
return NULL;
|
||||
}
|
||||
|
||||
MaterialInstance* Factory::findInstance (const std::string& name)
|
||||
|
@ -434,8 +435,9 @@ namespace sh
|
|||
|
||||
std::string Factory::retrieveTextureAlias (const std::string& name)
|
||||
{
|
||||
if (mTextureAliases.find(name) != mTextureAliases.end())
|
||||
return mTextureAliases[name];
|
||||
TextureAliasMap::iterator it = mTextureAliases.find(name);
|
||||
if (it != mTextureAliases.end())
|
||||
return it->second;
|
||||
else
|
||||
return "";
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue