# pk3: fix CanRead()
# fix small typo in Importer.cpp git-svn-id: https://assimp.svn.sourceforge.net/svnroot/assimp/trunk@962 67173fc5-114c-0410-ac8e-9d2fd5bffc1fpull/1/head
parent
5a2d2d08e2
commit
ea3372f232
|
@ -991,7 +991,7 @@ const aiScene* Importer::ReadFile( const char* _pFile, unsigned int pFlags)
|
||||||
// not so bad yet ... try format auto detection.
|
// not so bad yet ... try format auto detection.
|
||||||
const std::string::size_type s = pFile.find_last_of('.');
|
const std::string::size_type s = pFile.find_last_of('.');
|
||||||
if (s != std::string::npos) {
|
if (s != std::string::npos) {
|
||||||
DefaultLogger::get()->info("File extension now known, trying signature-based detection");
|
DefaultLogger::get()->info("File extension not known, trying signature-based detection");
|
||||||
for( unsigned int a = 0; a < pimpl->mImporter.size(); a++) {
|
for( unsigned int a = 0; a < pimpl->mImporter.size(); a++) {
|
||||||
|
|
||||||
if( pimpl->mImporter[a]->CanRead( pFile, pimpl->mIOHandler, true)) {
|
if( pimpl->mImporter[a]->CanRead( pFile, pimpl->mIOHandler, true)) {
|
||||||
|
|
|
@ -151,10 +151,7 @@ Q3BSPFileImporter::~Q3BSPFileImporter()
|
||||||
}
|
}
|
||||||
|
|
||||||
std::vector<Q3BSP::sQ3BSPFace*> *pCurFaceArray = (*it).second;
|
std::vector<Q3BSP::sQ3BSPFace*> *pCurFaceArray = (*it).second;
|
||||||
if ( NULL != pCurFaceArray )
|
delete pCurFaceArray;
|
||||||
{
|
|
||||||
delete pCurFaceArray;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
m_MaterialLookupMap.clear();
|
m_MaterialLookupMap.clear();
|
||||||
}
|
}
|
||||||
|
@ -163,13 +160,11 @@ Q3BSPFileImporter::~Q3BSPFileImporter()
|
||||||
// Returns true, if the loader can read this.
|
// Returns true, if the loader can read this.
|
||||||
bool Q3BSPFileImporter::CanRead( const std::string& rFile, IOSystem* pIOHandler, bool checkSig ) const
|
bool Q3BSPFileImporter::CanRead( const std::string& rFile, IOSystem* pIOHandler, bool checkSig ) const
|
||||||
{
|
{
|
||||||
bool isBSPData = false;
|
if(!checkSig) {
|
||||||
if ( checkSig )
|
return SimpleExtensionCheck( rFile, Q3BSPExtension .c_str() );
|
||||||
{
|
|
||||||
isBSPData = SimpleExtensionCheck( rFile, Q3BSPExtension .c_str() );
|
|
||||||
}
|
}
|
||||||
|
// TODO perhaps add keyword based detection
|
||||||
return isBSPData;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ------------------------------------------------------------------------------------------------
|
// ------------------------------------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue