summaryrefslogtreecommitdiff
path: root/Source/UnitTests/Common/FloatUtilsTest.cpp
diff options
context:
space:
mode:
authorShawn Hoffman <godisgovernment@gmail.com>2021-07-17 17:41:41 -0700
committerShawn Hoffman <godisgovernment@gmail.com>2021-07-17 17:41:41 -0700
commit1009825cb213f98a82840fb69bc88cc9b0fc6c5a (patch)
tree6bacd7f81451dd8d910689b06562ed73e1bc060a /Source/UnitTests/Common/FloatUtilsTest.cpp
parente9068e108a401cbb9d6f8afb46bc4e5c1ff27851 (diff)
unittests: remove some msvc-specific casts
compiles on contemporary msvc checked there is still a mul in release codegen
Diffstat (limited to 'Source/UnitTests/Common/FloatUtilsTest.cpp')
-rw-r--r--Source/UnitTests/Common/FloatUtilsTest.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/Source/UnitTests/Common/FloatUtilsTest.cpp b/Source/UnitTests/Common/FloatUtilsTest.cpp
index 5a4f407f75..4f98409911 100644
--- a/Source/UnitTests/Common/FloatUtilsTest.cpp
+++ b/Source/UnitTests/Common/FloatUtilsTest.cpp
@@ -28,10 +28,8 @@ TEST(FloatUtils, FlushToZero)
// we want the multiplication to occur at test runtime.
volatile float s = std::numeric_limits<float>::denorm_min();
volatile double d = std::numeric_limits<double>::denorm_min();
- // Casting away the volatile attribute is required in order for msvc to resolve this to the
- // correct instance of the comparison function.
- EXPECT_LT(0.f, (float)(s * 2));
- EXPECT_LT(0.0, (double)(d * 2));
+ EXPECT_LT(0.f, s * 2);
+ EXPECT_LT(0.0, d * 2);
EXPECT_EQ(+0.0, Common::FlushToZero(+std::numeric_limits<double>::denorm_min()));
EXPECT_EQ(-0.0, Common::FlushToZero(-std::numeric_limits<double>::denorm_min()));