Moved static for local to global scope in Uniform.cpp and removed the local static usage in Registry.cpp

This commit is contained in:
Robert Osfield
2012-11-21 14:27:54 +00:00
parent 3a67eefd9f
commit 4b4327aaae
2 changed files with 4 additions and 9 deletions

View File

@@ -967,13 +967,12 @@ GLenum Uniform::getInternalArrayType( Type t )
}
}
typedef std::map<std::string, unsigned int> UniformNameIDMap;
static OpenThreads::Mutex s_mutex_uniformNameIDMap;
static UniformNameIDMap s_uniformNameIDMap;
unsigned int Uniform::getNameID(const std::string& name)
{
typedef std::map<std::string, unsigned int> UniformNameIDMap;
static OpenThreads::Mutex s_mutex_uniformNameIDMap;
static UniformNameIDMap s_uniformNameIDMap;
OpenThreads::ScopedLock<OpenThreads::Mutex> lock(s_mutex_uniformNameIDMap);
UniformNameIDMap::iterator it = s_uniformNameIDMap.find(name);
if (it != s_uniformNameIDMap.end())