ソースを参照

OgreImporter: Forgot to rebuild after filename changes so broke the build. Fix includes, add include guards and ASSIMP_BUILD_NO_OGRE_IMPORTER to missing places.

Jonne Nauha 11 年 前
コミット
45715df263

+ 1 - 1
code/ImporterRegistry.cpp

@@ -140,7 +140,7 @@ corresponding preprocessor flag to selectively disable formats.
 #	include "LWSLoader.h"
 #endif
 #ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER
-#	include "OgreImporter.hpp"
+#	include "OgreImporter.h"
 #endif
 #ifndef ASSIMP_BUILD_NO_MS3D_IMPORTER
 #	include "MS3DLoader.h"

+ 3 - 2
code/OgreImporter.cpp

@@ -44,7 +44,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <vector>
 #include <sstream>
 
-#include "OgreImporter.hpp"
+#include "OgreImporter.h"
 #include "TinyFormatter.h"
 #include "irrXMLWrapper.h"
 
@@ -74,7 +74,8 @@ bool OgreImporter::CanRead(const std::string &pFile, Assimp::IOSystem *pIOHandle
 	{
 		string ext = "mesh.xml";
 		int len = ext.length();
-		return (ASSIMP_stricmp(pFile.substr(pFile.length()-len, len), ext) == 0);
+		string fileExt = ToLower(pFile.substr(pFile.length()-len, len));
+		return (ASSIMP_stricmp(fileExt, ext) == 0);
 	}
 	const char* tokens[] = {"<mesh>"};
 	return BaseImporter::SearchFileHeaderForToken(pIOHandler, pFile, tokens, 1);

+ 8 - 0
code/OgreImporter.h

@@ -1,4 +1,9 @@
 
+#ifndef AI_OGREIMPORTER_H_INC
+#define AI_OGREIMPORTER_H_INC
+
+#ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER
+
 #include "BaseImporter.h"
 #include "irrXMLWrapper.h"
 #include "OgreParsingUtils.h"
@@ -224,3 +229,6 @@ struct Animation
 
 }//namespace Ogre
 }//namespace Assimp
+
+#endif // ASSIMP_BUILD_NO_OGRE_IMPORTER
+#endif // AI_OGREIMPORTER_H_INC

+ 1 - 1
code/OgreMesh.cpp

@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER
 
-#include "OgreImporter.hpp"
+#include "OgreImporter.h"
 #include "TinyFormatter.h"
 
 using namespace std;

+ 8 - 0
code/OgreParsingUtils.h

@@ -1,4 +1,9 @@
 
+#ifndef AI_OGREPARSINGUTILS_H_INC
+#define AI_OGREPARSINGUTILS_H_INC
+
+#ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER
+
 #include "ParsingUtils.h"
 #include "irrXMLWrapper.h"
 #include "fast_atof.h"
@@ -143,3 +148,6 @@ static inline std::string &Trim(std::string &s, bool newlines = true)
 
 } // Ogre
 } // Assimp
+
+#endif // ASSIMP_BUILD_NO_OGRE_IMPORTER
+#endif // AI_OGREPARSINGUTILS_H_INC

+ 1 - 1
code/OgreSkeleton.cpp

@@ -42,7 +42,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 
 #ifndef ASSIMP_BUILD_NO_OGRE_IMPORTER
 
-#include "OgreImporter.hpp"
+#include "OgreImporter.h"
 #include "TinyFormatter.h"
 
 using namespace std;