Fixed GCC 4.5 and older build #566

This commit is contained in:
Christophe Riccio
2016-12-01 23:05:43 +01:00
parent 57091f8553
commit 2dda5af72c
11 changed files with 53 additions and 27 deletions

View File

@@ -2,6 +2,8 @@
#define GLM_FORCE_SWIZZLE
#include <glm/glm.hpp>
#if !GLM_HAS_ONLY_XYZW
int test_ivec2_swizzle()
{
int Error = 0;
@@ -60,16 +62,19 @@ int test_vec4_swizzle()
return Error;
}
#endif//!GLM_HAS_ONLY_XYZW
int main()
{
int Error = 0;
Error += test_ivec2_swizzle();
Error += test_ivec3_swizzle();
Error += test_ivec4_swizzle();
# if !GLM_HAS_ONLY_XYZW
Error += test_ivec2_swizzle();
Error += test_ivec3_swizzle();
Error += test_ivec4_swizzle();
Error += test_vec4_swizzle();
Error += test_vec4_swizzle();
# endif//!GLM_HAS_ONLY_XYZW
return Error;
}

View File

@@ -226,7 +226,7 @@ int test_instruction_set()
int test_cpp_version()
{
std::printf("__cplusplus: %lld\n", __cplusplus);
std::printf("__cplusplus: %d\n", static_cast<int>(__cplusplus));
return 0;
}

View File

@@ -334,6 +334,7 @@ int test_vec3_swizzle3_3()
return Error;
}
#if !GLM_HAS_ONLY_XYZW
int test_vec3_swizzle_operators()
{
int Error = 0;
@@ -440,6 +441,7 @@ int test_vec3_swizzle_partial()
return Error;
}
#endif//!GLM_HAS_ONLY_XYZW
int test_operator_increment()
{
@@ -480,10 +482,13 @@ int main()
Error += test_vec3_size();
Error += test_vec3_swizzle3_2();
Error += test_vec3_swizzle3_3();
Error += test_vec3_swizzle_partial();
Error += test_vec3_swizzle_operators();
Error += test_vec3_swizzle_functions();
Error += test_operator_increment();
# if !GLM_HAS_ONLY_XYZW
Error += test_vec3_swizzle_partial();
Error += test_vec3_swizzle_operators();
Error += test_vec3_swizzle_functions();
# endif//!GLM_HAS_ONLY_XYZW
return Error;
}