Explorar el Código

Merge pull request #39 from devurandom/fix/pedantic-c99

Fixes errors with -pedantic -std=c99 and GCC 4.7.2
Alexander Gessler hace 12 años
padre
commit
be457757a5
Se han modificado 5 ficheros con 16 adiciones y 11 borrados
  1. 1 1
      include/assimp/anim.h
  2. 1 1
      include/assimp/light.h
  3. 12 8
      include/assimp/material.h
  4. 1 1
      include/assimp/mesh.h
  5. 1 0
      include/assimp/types.h

+ 1 - 1
include/assimp/anim.h

@@ -208,7 +208,7 @@ enum aiAnimBehaviour
 	/** This value is not used, it is just here to force the
 	 *  the compiler to map this enum to a 32 Bit integer  */
 #ifndef SWIG
-	_aiAnimBehaviour_Force32Bit = 0x8fffffff
+	_aiAnimBehaviour_Force32Bit = INT_MAX
 #endif
 };
 

+ 1 - 1
include/assimp/light.h

@@ -80,7 +80,7 @@ enum aiLightSourceType
 	 *  compiler to map this enum to a 32 Bit integer.
 	 */
 #ifndef SWIG
-	_aiLightSource_Force32Bit = 0x9fffffff
+	_aiLightSource_Force32Bit = INT_MAX
 #endif
 };
 

+ 12 - 8
include/assimp/material.h

@@ -100,7 +100,7 @@ enum aiTextureOp
 	 *  32 Bit integers to represent this enum.
 	 */
 #ifndef SWIG
-	_aiTextureOp_Force32Bit = 0x9fffffff
+	_aiTextureOp_Force32Bit = INT_MAX
 #endif
 	//! @endcond
 };
@@ -136,7 +136,7 @@ enum aiTextureMapMode
 	  *  32 Bit integers to represent this enum.
 	  */
 #ifndef SWIG
-	_aiTextureMapMode_Force32Bit = 0x9fffffff
+	_aiTextureMapMode_Force32Bit = INT_MAX
 #endif
 	//! @endcond
 };
@@ -181,7 +181,7 @@ enum aiTextureMapping
 	  *  32 Bit integers to represent this enum.
 	  */
 #ifndef SWIG
-	_aiTextureMapping_Force32Bit = 0x9fffffff
+	_aiTextureMapping_Force32Bit = INT_MAX
 #endif
 	//! @endcond
 };
@@ -301,7 +301,7 @@ enum aiTextureType
 	  *  32 Bit integers to represent this enum.
 	  */
 #ifndef SWIG
-	_aiTextureType_Force32Bit = 0x9fffffff
+	_aiTextureType_Force32Bit = INT_MAX
 #endif
 	//! @endcond
 };
@@ -379,7 +379,7 @@ enum aiShadingMode
 	  *  32 Bit integers to represent this enum.
 	  */
 #ifndef SWIG
-	_aiShadingMode_Force32Bit = 0x9fffffff
+	_aiShadingMode_Force32Bit = INT_MAX
 #endif
 	//! @endcond
 };
@@ -425,7 +425,7 @@ enum aiTextureFlags
 	  *  32 Bit integers to represent this enum.
 	  */
 #ifndef SWIG
-	  _aiTextureFlags_Force32Bit = 0x9fffffff
+	  _aiTextureFlags_Force32Bit = INT_MAX
 #endif
 	//! @endcond
 };
@@ -474,7 +474,7 @@ enum aiBlendMode
 	  *  32 Bit integers to represent this enum.
 	  */
 #ifndef SWIG
-	_aiBlendMode_Force32Bit = 0x9fffffff
+	_aiBlendMode_Force32Bit = INT_MAX
 #endif
 	//! @endcond
 };
@@ -568,7 +568,7 @@ enum aiPropertyTypeInfo
 	 *  compiler to map this enum to a 32 Bit integer.
 	 */
 #ifndef SWIG
-	 _aiPTI_Force32Bit = 0x9fffffff
+	 _aiPTI_Force32Bit = INT_MAX
 #endif
 };
 
@@ -657,7 +657,11 @@ struct aiMaterialProperty
 *  have to stick with the aiMaterialGetXXX family of unbound functions.
 *  The library defines a set of standard keys (AI_MATKEY_XXX).
 */
+#ifdef __cplusplus
 struct ASSIMP_API aiMaterial
+#else
+struct aiMaterial
+#endif
 {
 
 #ifdef __cplusplus

+ 1 - 1
include/assimp/mesh.h

@@ -319,7 +319,7 @@ enum aiPrimitiveType
 	 *  compiler to map this enum to a 32 Bit integer.
 	 */
 #ifndef SWIG
-	_aiPrimitiveType_Force32Bit = 0x9fffffff
+	_aiPrimitiveType_Force32Bit = INT_MAX
 #endif
 }; //! enum aiPrimitiveType
 

+ 1 - 0
include/assimp/types.h

@@ -50,6 +50,7 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 #include <memory.h>
 #include <math.h>
 #include <stddef.h>
+#include <limits.h>
 
 // Our compile configuration
 #include "defs.h"