Explorar o código

Merge pull request #2236 from rdb/patch-1

Fix static init ordering issue in 3mf importer
Kim Kulling %!s(int64=6) %!d(string=hai) anos
pai
achega
837a0742c4
Modificáronse 1 ficheiros con 2 adicións e 4 borrados
  1. 2 4
      code/D3MFImporter.cpp

+ 2 - 4
code/D3MFImporter.cpp

@@ -419,8 +419,6 @@ private:
 
 
 } //namespace D3MF
 } //namespace D3MF
 
 
-static const std::string Extension = "3mf";
-
 static const aiImporterDesc desc = {
 static const aiImporterDesc desc = {
     "3mf Importer",
     "3mf Importer",
     "",
     "",
@@ -431,7 +429,7 @@ static const aiImporterDesc desc = {
     0,
     0,
     0,
     0,
     0,
     0,
-    Extension.c_str()
+    "3mf"
 };
 };
 
 
 D3MFImporter::D3MFImporter()
 D3MFImporter::D3MFImporter()
@@ -445,7 +443,7 @@ D3MFImporter::~D3MFImporter() {
 
 
 bool D3MFImporter::CanRead(const std::string &filename, IOSystem *pIOHandler, bool checkSig) const {
 bool D3MFImporter::CanRead(const std::string &filename, IOSystem *pIOHandler, bool checkSig) const {
     const std::string extension( GetExtension( filename ) );
     const std::string extension( GetExtension( filename ) );
-    if(extension == Extension ) {
+    if(extension == desc.mFileExtensions ) {
         return true;
         return true;
     } else if ( !extension.length() || checkSig ) {
     } else if ( !extension.length() || checkSig ) {
         if ( nullptr == pIOHandler ) {
         if ( nullptr == pIOHandler ) {