diff --git a/source/Irrlicht/CFileSystem.cpp b/source/Irrlicht/CFileSystem.cpp index 0bb24a19..58982154 100644 --- a/source/Irrlicht/CFileSystem.cpp +++ b/source/Irrlicht/CFileSystem.cpp @@ -745,15 +745,10 @@ IFileList* CFileSystem::createFileList() r = new CFileList(Path, true, false); - // TODO: Should be unified once mingw adapts the proper types -#if defined(__GNUC__) - long hFile; //mingw return type declaration -#else + // intptr_t is optional but supported by MinGW since 2007 or earlier. intptr_t hFile; -#endif - struct _tfinddata_t c_file; - if( (hFile = _tfindfirst( _T("*"), &c_file )) != -1L ) + if( (hFile = _tfindfirst( _T("*"), &c_file )) != (intptr_t)(-1L) ) { do {