From c2deb3e15f58fafa253668390bcb9b6a22496169 Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Wed, 30 Nov 2016 15:03:32 +0100 Subject: [PATCH] BaseIMporter: fix review findings. --- code/BaseImporter.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/code/BaseImporter.cpp b/code/BaseImporter.cpp index 20321d0ad..3d53bc089 100644 --- a/code/BaseImporter.cpp +++ b/code/BaseImporter.cpp @@ -136,14 +136,17 @@ void BaseImporter::GetExtensionList(std::set& extensions) } // ------------------------------------------------------------------------------------------------ -/*static*/ bool BaseImporter::SearchFileHeaderForToken(IOSystem* pIOHandler, +/*static*/ bool BaseImporter::SearchFileHeaderForToken( IOSystem* pIOHandler, const std::string& pFile, const char** tokens, unsigned int numTokens, unsigned int searchBytes /* = 200 */, bool tokensSol /* false */) { - ai_assert(NULL != tokens && 0 != numTokens && 0 != searchBytes); + ai_assert( NULL != tokens ); + ai_assert( 0 != numTokens ); + ai_assert( 0 != searchBytes); + if (!pIOHandler) return false; @@ -178,8 +181,6 @@ void BaseImporter::GetExtensionList(std::set& extensions) for (unsigned int i = 0; i < numTokens;++i) { ai_assert(NULL != tokens[i]); - - const char* r = strstr(buffer,tokens[i]); if( !r ) { continue;