diff options
author | Waley <waley.chen@10gen.com> | 2016-01-27 13:48:16 -0500 |
---|---|---|
committer | Waley <waleycz@gmail.com> | 2016-02-08 11:28:07 -0500 |
commit | e34706733411e42dba63826a10b15f81e13fdd0d (patch) | |
tree | 2b29f4bcb8e43ed20ed2e2d907ff55a7bdc80214 /src/mongo/platform | |
parent | 93f767caeebda5ffd295f935e734e0bf02da3356 (diff) | |
download | mongo-e34706733411e42dba63826a10b15f81e13fdd0d.tar.gz |
SERVER-10568 SafeNum should be written in terms of explicitly sized types
Diffstat (limited to 'src/mongo/platform')
-rw-r--r-- | src/mongo/platform/decimal128.cpp | 2 | ||||
-rw-r--r-- | src/mongo/platform/decimal128.h | 2 | ||||
-rw-r--r-- | src/mongo/platform/decimal128_dummy.cpp | 2 | ||||
-rw-r--r-- | src/mongo/platform/decimal128_test.cpp | 6 |
4 files changed, 6 insertions, 6 deletions
diff --git a/src/mongo/platform/decimal128.cpp b/src/mongo/platform/decimal128.cpp index a7e2e17203e..8ec4cc924b1 100644 --- a/src/mongo/platform/decimal128.cpp +++ b/src/mongo/platform/decimal128.cpp @@ -108,7 +108,7 @@ BID_UINT128 quantizeTo15DecimalDigits(BID_UINT128 value, Decimal128::Decimal128(std::int32_t int32Value) : _value(libraryTypeToValue(bid128_from_int32(int32Value))) {} -Decimal128::Decimal128(long long int64Value) +Decimal128::Decimal128(std::int64_t int64Value) : _value(libraryTypeToValue(bid128_from_int64(int64Value))) {} /** diff --git a/src/mongo/platform/decimal128.h b/src/mongo/platform/decimal128.h index cc6245f93af..e9112190bbb 100644 --- a/src/mongo/platform/decimal128.h +++ b/src/mongo/platform/decimal128.h @@ -128,7 +128,7 @@ public: Decimal128(Decimal128::Value dec128Value) : _value(dec128Value) {} Decimal128(std::int32_t int32Value); - Decimal128(long long int64Value); + Decimal128(std::int64_t int64Value); /** * This constructor takes a double and constructs a Decimal128 object diff --git a/src/mongo/platform/decimal128_dummy.cpp b/src/mongo/platform/decimal128_dummy.cpp index bdc776a8110..d2db7d5892a 100644 --- a/src/mongo/platform/decimal128_dummy.cpp +++ b/src/mongo/platform/decimal128_dummy.cpp @@ -37,7 +37,7 @@ Decimal128::Decimal128(int32_t int32Value) { invariant(false); } -Decimal128::Decimal128(long long int64Value) { +Decimal128::Decimal128(int64_t int64Value) { invariant(false); } diff --git a/src/mongo/platform/decimal128_test.cpp b/src/mongo/platform/decimal128_test.cpp index 7b6c21a98b3..a90eca6ee7c 100644 --- a/src/mongo/platform/decimal128_test.cpp +++ b/src/mongo/platform/decimal128_test.cpp @@ -73,7 +73,7 @@ TEST(Decimal128Test, TestInt32ConstructorMin) { } TEST(Decimal128Test, TestInt64ConstructorZero) { - long long longZero = 0; + int64_t longZero = 0; Decimal128 d(longZero); Decimal128::Value val = d.getValue(); // 0x3040000000000000 0000000000000000 = +0E+0 @@ -84,7 +84,7 @@ TEST(Decimal128Test, TestInt64ConstructorZero) { } TEST(Decimal128Test, TestInt64ConstructorMax) { - long long longMax = std::numeric_limits<long long>::max(); + int64_t longMax = std::numeric_limits<long long>::max(); Decimal128 d(longMax); Decimal128::Value val = d.getValue(); // 0x3040000000000000 7fffffffffffffff = +9223372036854775807E+0 @@ -95,7 +95,7 @@ TEST(Decimal128Test, TestInt64ConstructorMax) { } TEST(Decimal128Test, TestInt64ConstructorMin) { - long long longMin = std::numeric_limits<long long>::lowest(); + int64_t longMin = std::numeric_limits<long long>::lowest(); Decimal128 d(longMin); Decimal128::Value val = d.getValue(); // 0xb040000000000000 8000000000000000 = -9223372036854775808E+0 |