From 006955218348bbe3e6af93e3892fb0bc1c13783e Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 1 May 2017 15:11:22 +0200 Subject: [PATCH] Fix static init ordering bug in OpenGEX importer --- code/OpenGEXImporter.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/code/OpenGEXImporter.cpp b/code/OpenGEXImporter.cpp index 5df6d1646..36b19ab0e 100644 --- a/code/OpenGEXImporter.cpp +++ b/code/OpenGEXImporter.cpp @@ -52,8 +52,6 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include -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 );