From a7e0e8387b5ecc7afed5c6008689b093facecf3e Mon Sep 17 00:00:00 2001 From: Groove Date: Sat, 28 Jul 2018 20:32:26 +0200 Subject: [PATCH] Fixed error: comparing floating point with == or != is unsafe --- test/ext/ext_vec1.cpp | 12 ++++++------ test/gtc/gtc_type_ptr.cpp | 2 ++ 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/test/ext/ext_vec1.cpp b/test/ext/ext_vec1.cpp index ab1d6896..e71b4aec 100644 --- a/test/ext/ext_vec1.cpp +++ b/test/ext/ext_vec1.cpp @@ -10,8 +10,8 @@ static int test_vec1_operators() { int Error(0); - glm::vec1 A(1.0f); - glm::vec1 B(1.0f); + glm::ivec1 A(1.0f); + glm::ivec1 B(1.0f); { bool R = A != B; bool S = A == B; @@ -20,10 +20,10 @@ static int test_vec1_operators() } { - A *= 1.0f; - B *= 1.0; - A += 1.0f; - B += 1.0; + A *= 1; + B *= 1; + A += 1; + B += 1; bool R = A != B; bool S = A == B; diff --git a/test/gtc/gtc_type_ptr.cpp b/test/gtc/gtc_type_ptr.cpp index cd3b0502..6fcd3054 100644 --- a/test/gtc/gtc_type_ptr.cpp +++ b/test/gtc/gtc_type_ptr.cpp @@ -1,5 +1,7 @@ #include #include +#include +#include int test_value_ptr_vec() {