Enable /WX, warning as error on Visual Studio
This commit is contained in:
@@ -124,7 +124,7 @@ namespace mask
|
||||
{32, 0xffffffff}
|
||||
};
|
||||
|
||||
int Error(0);
|
||||
int Error = 0;
|
||||
/* mask_zero is sadly not a correct code
|
||||
for(std::size_t i = 0; i < sizeof(Data) / sizeof(type<int>); ++i)
|
||||
{
|
||||
@@ -495,6 +495,9 @@ namespace bitfieldInterleave
|
||||
glm::uint64 B(glm::bitfieldInterleave(glm::uint16(x), glm::uint16(y)));
|
||||
glm::uint64 C(glm::bitfieldInterleave(glm::uint32(x), glm::uint32(y)));
|
||||
|
||||
assert(A == B);
|
||||
assert(A == C);
|
||||
|
||||
glm::int64 D(glm::bitfieldInterleave(glm::int8(x), glm::int8(y)));
|
||||
glm::int64 E(glm::bitfieldInterleave(glm::int16(x), glm::int16(y)));
|
||||
glm::int64 F(glm::bitfieldInterleave(glm::int32(x), glm::int32(y)));
|
||||
@@ -675,10 +678,10 @@ namespace bitfieldInterleave5
|
||||
GLM_FUNC_QUALIFIER glm::uint32 bitfieldInterleave_u16vec2(glm::uint16 x, glm::uint16 y)
|
||||
{
|
||||
glm::uint64 Result = (glm::uint64(y) << 32) | glm::uint64(x);
|
||||
Result = ((Result << 8) | Result) & glm::uint32(0x00FF00FF00FF00FFull);
|
||||
Result = ((Result << 4) | Result) & glm::uint32(0x0F0F0F0F0F0F0F0Full);
|
||||
Result = ((Result << 2) | Result) & glm::uint32(0x3333333333333333ull);
|
||||
Result = ((Result << 1) | Result) & glm::uint32(0x5555555555555555ull);
|
||||
Result = ((Result << 8) | Result) & static_cast<glm::uint32>(0x00FF00FF00FF00FFull);
|
||||
Result = ((Result << 4) | Result) & static_cast<glm::uint32>(0x0F0F0F0F0F0F0F0Full);
|
||||
Result = ((Result << 2) | Result) & static_cast<glm::uint32>(0x3333333333333333ull);
|
||||
Result = ((Result << 1) | Result) & static_cast<glm::uint32>(0x5555555555555555ull);
|
||||
return static_cast<glm::uint32>((Result & 0x00000000FFFFFFFFull) | (Result >> 31));
|
||||
}
|
||||
|
||||
|
||||
@@ -2,14 +2,16 @@
|
||||
|
||||
int test_epsilon()
|
||||
{
|
||||
int Error(0);
|
||||
int Error = 0;
|
||||
|
||||
{
|
||||
float Test = glm::epsilon<float>();
|
||||
Error += Test > 0.0f ? 0 : 1;
|
||||
}
|
||||
|
||||
{
|
||||
double Test = glm::epsilon<double>();
|
||||
Error += Test > 0.0 ? 0 : 1;
|
||||
}
|
||||
|
||||
return Error;
|
||||
|
||||
@@ -271,7 +271,7 @@ int test_RGBM()
|
||||
|
||||
for(std::size_t i = 0; i < 1024; ++i)
|
||||
{
|
||||
glm::vec3 const Color(i);
|
||||
glm::vec3 const Color(static_cast<float>(i));
|
||||
glm::vec4 const RGBM = glm::packRGBM(Color);
|
||||
glm::vec3 const Result= glm::unpackRGBM(RGBM);
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ int test_quat_normalize()
|
||||
|
||||
int test_quat_euler()
|
||||
{
|
||||
int Error(0);
|
||||
int Error = 0;
|
||||
|
||||
{
|
||||
glm::quat q(1.0f, 0.0f, 0.0f, 1.0f);
|
||||
@@ -115,6 +115,7 @@ int test_quat_euler()
|
||||
float Pitch = glm::pitch(q);
|
||||
float Yaw = glm::yaw(q);
|
||||
glm::vec3 Angles = glm::eulerAngles(q);
|
||||
Error += glm::all(glm::epsilonEqual(Angles, glm::vec3(Pitch, Yaw, Roll), 0.000001f)) ? 0 : 1;
|
||||
}
|
||||
|
||||
{
|
||||
@@ -123,6 +124,7 @@ int test_quat_euler()
|
||||
double Pitch = glm::pitch(q);
|
||||
double Yaw = glm::yaw(q);
|
||||
glm::dvec3 Angles = glm::eulerAngles(q);
|
||||
Error += glm::all(glm::epsilonEqual(Angles, glm::dvec3(Pitch, Yaw, Roll), 0.000001)) ? 0 : 1;
|
||||
}
|
||||
|
||||
return Error;
|
||||
@@ -130,7 +132,7 @@ int test_quat_euler()
|
||||
|
||||
int test_quat_slerp()
|
||||
{
|
||||
int Error(0);
|
||||
int Error = 0;
|
||||
|
||||
float const Epsilon = 0.0001f;//glm::epsilon<float>();
|
||||
|
||||
@@ -236,14 +238,6 @@ int test_quat_two_axis_ctr()
|
||||
return Error;
|
||||
}
|
||||
|
||||
int test_quat_type()
|
||||
{
|
||||
glm::quat A;
|
||||
glm::dquat B;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
int test_quat_mul_vec()
|
||||
{
|
||||
int Error(0);
|
||||
@@ -310,7 +304,6 @@ int main()
|
||||
Error += test_quat_two_axis_ctr();
|
||||
Error += test_quat_mul();
|
||||
Error += test_quat_precision();
|
||||
Error += test_quat_type();
|
||||
Error += test_quat_angle();
|
||||
Error += test_quat_angleAxis();
|
||||
Error += test_quat_mix();
|
||||
|
||||
@@ -130,17 +130,6 @@ int main()
|
||||
{
|
||||
int Error = 0;
|
||||
|
||||
my_vec4_aligned GNA;
|
||||
my_dvec4_aligned GNI;
|
||||
|
||||
std::size_t A0 = sizeof(my_dvec4_aligned);
|
||||
std::size_t B0 = sizeof(my_dvec4_packed);
|
||||
std::size_t C0 = sizeof(glm::aligned_dvec4);
|
||||
|
||||
std::size_t A1 = sizeof(my_vec4_aligned);
|
||||
std::size_t B1 = sizeof(my_vec4_packed);
|
||||
std::size_t C1 = sizeof(glm::aligned_vec4);
|
||||
|
||||
Error += test_ctor();
|
||||
Error += test_copy();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user