Merge pull request #1696 from awefers/issue_1605

glTF: Always check signature
pull/1705/head^2
Kim Kulling 2018-01-11 14:10:12 +01:00 committed by GitHub
commit c5101b185d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View File

@ -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");

View File

@ -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");