Browse Source

Merge pull request #1253 from rdb/master

Fix static init ordering bug in OpenGEX importer
Kim Kulling 8 years ago
parent
commit
b93df233e3
1 changed files with 2 additions and 4 deletions
  1. 2 4
      code/OpenGEXImporter.cpp

+ 2 - 4
code/OpenGEXImporter.cpp

@@ -52,8 +52,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 
 #include <vector>
 #include <vector>
 
 
-static const std::string OpenGexExt = "ogex";
-
 static const aiImporterDesc desc = {
 static const aiImporterDesc desc = {
     "Open Game Engine Exchange",
     "Open Game Engine Exchange",
     "",
     "",
@@ -64,7 +62,7 @@ static const aiImporterDesc desc = {
     0,
     0,
     0,
     0,
     0,
     0,
-    OpenGexExt.c_str()
+    "ogex"
 };
 };
 
 
 namespace Grammar {
 namespace Grammar {
@@ -289,7 +287,7 @@ OpenGEXImporter::~OpenGEXImporter() {
 bool OpenGEXImporter::CanRead( const std::string &file, IOSystem *pIOHandler, bool checkSig ) const {
 bool OpenGEXImporter::CanRead( const std::string &file, IOSystem *pIOHandler, bool checkSig ) const {
     bool canRead( false );
     bool canRead( false );
     if( !checkSig ) {
     if( !checkSig ) {
-        canRead = SimpleExtensionCheck( file, OpenGexExt.c_str() );
+        canRead = SimpleExtensionCheck( file, "ogex" );
     } else {
     } else {
         static const char *token[] = { "Metric", "GeometryNode", "VertexArray (attrib", "IndexArray" };
         static const char *token[] = { "Metric", "GeometryNode", "VertexArray (attrib", "IndexArray" };
         canRead = BaseImporter::SearchFileHeaderForToken( pIOHandler, file, token, 4 );
         canRead = BaseImporter::SearchFileHeaderForToken( pIOHandler, file, token, 4 );