Fix static init ordering bug in OpenGEX importer
authorrdb <git@rdb.name>
Mon, 1 May 2017 13:11:22 +0000 (15:11 +0200)
committerrdb <git@rdb.name>
Mon, 1 May 2017 13:11:22 +0000 (15:11 +0200)
code/OpenGEXImporter.cpp

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