From 901b98126032562065e5261f5682e3db6d768c9b Mon Sep 17 00:00:00 2001 From: Axel Wefers Date: Tue, 9 Jan 2018 09:37:57 -0800 Subject: [PATCH] glTF: Always check signature Always check signature for glTF 1.0 and glTF 2.0 files to select the correct importer. Fixes #1605 --- code/glTF2Importer.cpp | 4 ++-- code/glTFImporter.cpp | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/code/glTF2Importer.cpp b/code/glTF2Importer.cpp index 94e5ca3f1..008f251ae 100644 --- a/code/glTF2Importer.cpp +++ b/code/glTF2Importer.cpp @@ -99,14 +99,14 @@ const aiImporterDesc* glTF2Importer::GetInfo() const 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); if (extension != "gltf" && extension != "glb") return false; - if (checkSig && pIOHandler) { + if (pIOHandler) { glTF2::Asset asset(pIOHandler); try { asset.Load(pFile, extension == "glb"); diff --git a/code/glTFImporter.cpp b/code/glTFImporter.cpp index 381e459fd..e5a1ae883 100644 --- a/code/glTFImporter.cpp +++ b/code/glTFImporter.cpp @@ -98,14 +98,14 @@ const aiImporterDesc* glTFImporter::GetInfo() const 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); if (extension != "gltf" && extension != "glb") return false; - if (checkSig && pIOHandler) { + if (pIOHandler) { glTF::Asset asset(pIOHandler); try { asset.Load(pFile, extension == "glb");