Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

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

… local static usage in Registry.cpp
  • Loading branch information...
commit 511db762a75dcd498de6d70d1d254eb09a33827d 1 parent e0985fd
Robert OSFIELD authored
Showing with 4 additions and 9 deletions.
  1. +3 −4 src/osg/Uniform.cpp
  2. +1 −5 src/osgDB/Registry.cpp
View
7 src/osg/Uniform.cpp
@@ -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())
View
6 src/osgDB/Registry.cpp
@@ -749,11 +749,7 @@ std::string Registry::createLibraryNameForExtension(const std::string& ext)
ExtensionAliasMap::iterator itr=_extAliasMap.find(lowercase_ext);
if (itr!=_extAliasMap.end() && ext != itr->second) return createLibraryNameForExtension(itr->second);
-#if defined(OSG_JAVA_BUILD)
- static std::string prepend = std::string("osgPlugins-")+std::string(osgGetVersion())+std::string("/java");
-#else
- static std::string prepend = std::string("osgPlugins-")+std::string(osgGetVersion())+std::string("/");
-#endif
+ std::string prepend = std::string("osgPlugins-")+std::string(osgGetVersion())+std::string("/");
#if defined(__CYGWIN__)
return prepend+"cygwin_"+"osgdb_"+lowercase_ext+OSG_LIBRARY_POSTFIX_WITH_QUOTES+".dll";
Please sign in to comment.
Something went wrong with that request. Please try again.