Browse Source

Merge pull request #1696 from awefers/issue_1605

glTF: Always check signature
Kim Kulling 7 năm trước cách đây
mục cha
commit
c5101b185d
2 tập tin đã thay đổi với 4 bổ sung4 xóa
  1. 2 2
      code/glTF2Importer.cpp
  2. 2 2
      code/glTFImporter.cpp

+ 2 - 2
code/glTF2Importer.cpp

@@ -99,14 +99,14 @@ const aiImporterDesc* glTF2Importer::GetInfo() const
     return &desc;
     return &desc;
 }
 }
 
 
-bool glTF2Importer::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
+bool glTF2Importer::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool /* checkSig */) const
 {
 {
     const std::string &extension = GetExtension(pFile);
     const std::string &extension = GetExtension(pFile);
 
 
     if (extension != "gltf" && extension != "glb")
     if (extension != "gltf" && extension != "glb")
         return false;
         return false;
 
 
-    if (checkSig && pIOHandler) {
+    if (pIOHandler) {
         glTF2::Asset asset(pIOHandler);
         glTF2::Asset asset(pIOHandler);
         try {
         try {
             asset.Load(pFile, extension == "glb");
             asset.Load(pFile, extension == "glb");

+ 2 - 2
code/glTFImporter.cpp

@@ -98,14 +98,14 @@ const aiImporterDesc* glTFImporter::GetInfo() const
     return &desc;
     return &desc;
 }
 }
 
 
-bool glTFImporter::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool checkSig) const
+bool glTFImporter::CanRead(const std::string& pFile, IOSystem* pIOHandler, bool /* checkSig */) const
 {
 {
     const std::string &extension = GetExtension(pFile);
     const std::string &extension = GetExtension(pFile);
 
 
     if (extension != "gltf" && extension != "glb")
     if (extension != "gltf" && extension != "glb")
         return false;
         return false;
 
 
-    if (checkSig && pIOHandler) {
+    if (pIOHandler) {
         glTF::Asset asset(pIOHandler);
         glTF::Asset asset(pIOHandler);
         try {
         try {
             asset.Load(pFile, extension == "glb");
             asset.Load(pFile, extension == "glb");