diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-06-14 13:58:35 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-06-14 15:11:52 -0400 |
commit | a16bc9371921766d41e7a86c3ca10080c677ce6d (patch) | |
tree | e135dfc49bddd8093fc4a19cfe87ba4a1a41169d /src | |
parent | ca77c160790082f8efd64a98c586d4fd3f4f64b4 (diff) | |
download | mongo-a16bc9371921766d41e7a86c3ca10080c677ce6d.tar.gz |
SERVER-27193 Fix signed/unsigned mismatch compilation warnings on MSVC
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/bson/util/builder.h | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/mongo/bson/util/builder.h b/src/mongo/bson/util/builder.h index e40238ca28f..fbb470fd6fd 100644 --- a/src/mongo/bson/util/builder.h +++ b/src/mongo/bson/util/builder.h @@ -478,11 +478,10 @@ private: StringBuilderImpl& appendIntegral(T val, int maxSize) { MONGO_STATIC_ASSERT(!std::is_same<T, char>()); // char shouldn't append as number. MONGO_STATIC_ASSERT(std::is_integral<T>()); - MONGO_STATIC_ASSERT(std::numeric_limits<T>::max() <= std::numeric_limits<uint64_t>::max()); if (val < 0) { *this << '-'; - append(StringData(ItoA(-uint64_t(val)))); // Send the magnitude to ItoA. + append(StringData(ItoA(0 - uint64_t(val)))); // Send the magnitude to ItoA. } else { append(StringData(ItoA(uint64_t(val)))); } |