summaryrefslogtreecommitdiff
path: root/src/mongo/db/storage/key_string_test.cpp
diff options
context:
space:
mode:
authorBenety Goh <benety@mongodb.com>2021-08-19 08:50:38 -0400
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-08-19 13:17:44 +0000
commitebf3af24d79133eddc61309d85f4267b69795d79 (patch)
treed714a4d922eec4f32771dc00e64f9d141de257d9 /src/mongo/db/storage/key_string_test.cpp
parentcbb527e1b930a4d55deb499312dce917cf491558 (diff)
downloadmongo-ebf3af24d79133eddc61309d85f4267b69795d79.tar.gz
SERVER-57633 fix implicit long long to double conversion in unit tests
Diffstat (limited to 'src/mongo/db/storage/key_string_test.cpp')
-rw-r--r--src/mongo/db/storage/key_string_test.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/storage/key_string_test.cpp b/src/mongo/db/storage/key_string_test.cpp
index 1721fce9773..c6592e45cae 100644
--- a/src/mongo/db/storage/key_string_test.cpp
+++ b/src/mongo/db/storage/key_string_test.cpp
@@ -1401,7 +1401,7 @@ TEST_F(KeyStringBuilderTest, AllPerm2Compare) {
#define COMPARE_HELPER(LHS, RHS) (((LHS) < (RHS)) ? -1 : (((LHS) == (RHS)) ? 0 : 1))
int compareLongToDouble(long long lhs, double rhs) {
- if (rhs >= std::numeric_limits<long long>::max())
+ if (rhs >= static_cast<double>(std::numeric_limits<long long>::max()))
return -1;
if (rhs < std::numeric_limits<long long>::min())
return 1;