From edfde4bfa24d71bc13c4bbb34366de34bacc994f Mon Sep 17 00:00:00 2001 From: Janusz Chorko Date: Sat, 14 Feb 2015 17:17:16 +0100 Subject: [PATCH 1/2] Fix ambiguous overload when uint32_t is not unsigned int but unsigned long. --- include/rapidjson/internal/biginteger.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rapidjson/internal/biginteger.h b/include/rapidjson/internal/biginteger.h index 72acfc3..a3a0c7f 100755 --- a/include/rapidjson/internal/biginteger.h +++ b/include/rapidjson/internal/biginteger.h @@ -172,7 +172,7 @@ public: }; if (exp == 0) return *this; for (; exp >= 27; exp -= 27) *this *= RAPIDJSON_UINT64_C2(0X6765C793, 0XFA10079D); // 5^27 - for (; exp >= 13; exp -= 13) *this *= 1220703125u; // 5^13 + for (; exp >= 13; exp -= 13) *this *= static_cast(1220703125u); // 5^13 if (exp > 0) *this *= kPow5[exp - 1]; return *this; } From 78befee2bd6cd8a54c24972a96fa9d50af509b33 Mon Sep 17 00:00:00 2001 From: Janusz Chorko Date: Sat, 14 Feb 2015 17:18:45 +0100 Subject: [PATCH 2/2] Fix compilation error when cstring does not import std::memcmp into global namespace. --- include/rapidjson/internal/biginteger.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/rapidjson/internal/biginteger.h b/include/rapidjson/internal/biginteger.h index a3a0c7f..3e97920 100755 --- a/include/rapidjson/internal/biginteger.h +++ b/include/rapidjson/internal/biginteger.h @@ -148,7 +148,7 @@ public: } bool operator==(const BigInteger& rhs) const { - return count_ == rhs.count_ && memcmp(digits_, rhs.digits_, count_ * sizeof(Type)) == 0; + return count_ == rhs.count_ && std::memcmp(digits_, rhs.digits_, count_ * sizeof(Type)) == 0; } bool operator==(const Type rhs) const {