Browse Source

Fixed warnings: cast and redefined defines

Christophe Riccio 13 years ago
parent
commit
fb220d3f84
2 changed files with 17 additions and 7 deletions
  1. 15 5
      test/core/core_func_swizzle.cpp
  2. 2 2
      test/gtx/gtx_integer.cpp

+ 15 - 5
test/core/core_func_swizzle.cpp

@@ -7,11 +7,21 @@
 // File    : test/core/core_func_swizzle.cpp
 ///////////////////////////////////////////////////////////////////////////////////////////////////
 
-#define GLM_FORCE_ONLY_XYZW
-//#define GLM_FORCE_PURE
-#define GLM_MESSAGES
-#define GLM_SWIZZLE
-#define GLM_FORCE_CXX98
+#ifndef GLM_FORCE_ONLY_XYZW
+#	define GLM_FORCE_ONLY_XYZW
+#endif
+//#ifndef GLM_FORCE_PURE
+//#	define GLM_FORCE_PURE
+//#endif
+#ifndef GLM_MESSAGES
+#	define GLM_MESSAGES
+#endif
+#ifndef GLM_SWIZZLE
+#	define GLM_SWIZZLE
+#endif
+#ifndef GLM_FORCE_CXX98
+#	define GLM_FORCE_CXX98
+#endif
 #include <glm/glm.hpp>
 
 int test_vec2_swizzle()

+ 2 - 2
test/gtx/gtx_integer.cpp

@@ -53,8 +53,8 @@ int test_nlz()
 {
 	int Error = 0;
 
-	for(std::size_t i = 1; i < 33; ++i)
-		Error += glm::nlz(i) == 31u - glm::findMSB(i) ? 0 : 1;
+	for(glm::uint i = 1; i < glm::uint(33); ++i)
+		Error += glm::nlz(i) == glm::uint(31u) - glm::findMSB(i) ? 0 : 1;
 		//printf("%d, %d\n", glm::nlz(i), 31u - glm::findMSB(i));
 
 	return Error;