Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/miloyip/rapidjson.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjwillcox-telework <65623287+jwillcox-telework@users.noreply.github.com>2022-08-22 18:46:45 +0300
committerMilo Yip <miloyip@gmail.com>2022-08-23 05:52:40 +0300
commit06d58b9e848c650114556a23294d0b6440078c61 (patch)
tree69eeeebf1d113e6edf8db057af7e23a670817181
parent22a62fcc2c2fa2418f5d358cdf65c1df73b418ae (diff)
Update dtoa.hHEADmaster
Fixed DigitGen to use proper suffix for uint64_t numeric types. Change from U suffix to ULL suffix. On SLED 11.0 compiler, code would not compile. cd rapidjson-master g++ -Wall -m32 -ggdb -Iinclude -O1 ./example/simpledom/simpledom.cpp -o simpledom 2>&1 | tee out.txt
-rw-r--r--include/rapidjson/internal/dtoa.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/include/rapidjson/internal/dtoa.h b/include/rapidjson/internal/dtoa.h
index 9f6ae3b3..cd456721 100644
--- a/include/rapidjson/internal/dtoa.h
+++ b/include/rapidjson/internal/dtoa.h
@@ -58,11 +58,11 @@ inline int CountDecimalDigit32(uint32_t n) {
}
inline void DigitGen(const DiyFp& W, const DiyFp& Mp, uint64_t delta, char* buffer, int* len, int* K) {
- static const uint64_t kPow10[] = { 1U, 10U, 100U, 1000U, 10000U, 100000U, 1000000U, 10000000U, 100000000U,
- 1000000000U, 10000000000U, 100000000000U, 1000000000000U,
- 10000000000000U, 100000000000000U, 1000000000000000U,
- 10000000000000000U, 100000000000000000U, 1000000000000000000U,
- 10000000000000000000U };
+ static const uint64_t kPow10[] = { 1ULL, 10ULL, 100ULL, 1000ULL, 10000ULL, 100000ULL, 1000000ULL, 10000000ULL, 100000000ULL,
+ 1000000000ULL, 10000000000ULL, 100000000000ULL, 1000000000000ULL,
+ 10000000000000ULL, 100000000000000ULL, 1000000000000000ULL,
+ 10000000000000000ULL, 100000000000000000ULL, 1000000000000000000ULL,
+ 10000000000000000000ULL };
const DiyFp one(uint64_t(1) << -Mp.e, Mp.e);
const DiyFp wp_w = Mp - W;
uint32_t p1 = static_cast<uint32_t>(Mp.f >> -one.e);