From 986255cdecc3979fb7307a6fdb315c0e2b61be80 Mon Sep 17 00:00:00 2001 From: Tom Kneiphof Date: Thu, 7 Mar 2024 17:29:53 +0100 Subject: [PATCH] Fix sequence-point warnings --- test/gtx/gtx_fast_trigonometry.cpp | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/test/gtx/gtx_fast_trigonometry.cpp b/test/gtx/gtx_fast_trigonometry.cpp index b91cee95..485154be 100644 --- a/test/gtx/gtx_fast_trigonometry.cpp +++ b/test/gtx/gtx_fast_trigonometry.cpp @@ -22,11 +22,11 @@ namespace fastCos float result = 0.f; const std::clock_t timestamp1 = std::clock(); - for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f) + for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i + 0.1f) result = glm::fastCos(i); const std::clock_t timestamp2 = std::clock(); - for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f) + for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i + 0.1f) result = glm::cos(i); const std::clock_t timestamp3 = std::clock(); @@ -58,11 +58,11 @@ namespace fastSin float result = 0.f; const std::clock_t timestamp1 = std::clock(); - for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f) + for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i + 0.1f) result = glm::fastSin(i); const std::clock_t timestamp2 = std::clock(); - for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f) + for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i + 0.1f) result = glm::sin(i); const std::clock_t timestamp3 = std::clock(); @@ -86,11 +86,11 @@ namespace fastTan float result = 0.f; const std::clock_t timestamp1 = std::clock(); - for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f) + for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i + 0.1f) result = glm::fastTan(i); const std::clock_t timestamp2 = std::clock(); - for (float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f) + for (float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i + 0.1f) result = glm::tan(i); const std::clock_t timestamp3 = std::clock(); @@ -114,11 +114,11 @@ namespace fastAcos float result = 0.f; const std::clock_t timestamp1 = std::clock(); - for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f) + for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i + 0.1f) result = glm::fastAcos(i); const std::clock_t timestamp2 = std::clock(); - for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f) + for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i + 0.1f) result = glm::acos(i); const std::clock_t timestamp3 = std::clock(); @@ -142,10 +142,10 @@ namespace fastAsin const float end = glm::pi(); float result = 0.f; const std::clock_t timestamp1 = std::clock(); - for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f) + for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i + 0.1f) result = glm::fastAsin(i); const std::clock_t timestamp2 = std::clock(); - for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f) + for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i + 0.1f) result = glm::asin(i); const std::clock_t timestamp3 = std::clock(); const std::clock_t time_fast = timestamp2 - timestamp1; @@ -167,10 +167,10 @@ namespace fastAtan const float end = glm::pi(); float result = 0.f; const std::clock_t timestamp1 = std::clock(); - for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f) + for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i + 0.1f) result = glm::fastAtan(i); const std::clock_t timestamp2 = std::clock(); - for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i += 0.1f) + for(float i = begin; i < end; i = NextFloat ? glm::nextFloat(i) : i + 0.1f) result = glm::atan(i); const std::clock_t timestamp3 = std::clock(); const std::clock_t time_fast = timestamp2 - timestamp1;