Merge branch 'new-file-detection' of https://github.com/krishty/assimp into krishty-new-file-detection
This commit is contained in:
@@ -140,22 +140,9 @@ STLImporter::~STLImporter() {
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Returns whether the class can handle the format of the given file.
|
||||
bool STLImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool checkSig) const {
|
||||
const std::string extension = GetExtension(pFile);
|
||||
|
||||
if (extension == "stl") {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (!extension.length() || checkSig) {
|
||||
if (!pIOHandler) {
|
||||
return true;
|
||||
}
|
||||
static const char * const tokens[] = { "STL", "solid" };
|
||||
return SearchFileHeaderForToken(pIOHandler, pFile, tokens, 2);
|
||||
}
|
||||
|
||||
return false;
|
||||
bool STLImporter::CanRead(const std::string &pFile, IOSystem *pIOHandler, bool /*checkSig*/) const {
|
||||
static const char *tokens[] = { "STL", "solid" };
|
||||
return SearchFileHeaderForToken(pIOHandler, pFile, tokens, AI_COUNT_OF(tokens));
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user