diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index 7b46873..18c2527 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -2325,7 +2325,7 @@ public: bool Uint64(uint64_t i) { new (stack_.template Push()) ValueType(i); return true; } bool Double(double d) { new (stack_.template Push()) ValueType(d); return true; } - bool Number(const Ch* str, SizeType length, bool copy) { + bool RawNumber(const Ch* str, SizeType length, bool copy) { if (copy) new (stack_.template Push()) ValueType(str, length, GetAllocator()); else diff --git a/include/rapidjson/reader.h b/include/rapidjson/reader.h index 5f8b1a9..7bec7cb 100644 --- a/include/rapidjson/reader.h +++ b/include/rapidjson/reader.h @@ -171,7 +171,7 @@ concept Handler { bool Uint64(uint64_t i); bool Double(double d); /// enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length) - bool Number(const Ch* str, SizeType length, bool copy); + bool RawNumber(const Ch* str, SizeType length, bool copy); bool String(const Ch* str, SizeType length, bool copy); bool StartObject(); bool Key(const Ch* str, SizeType length, bool copy); @@ -203,7 +203,7 @@ struct BaseReaderHandler { bool Uint64(uint64_t) { return static_cast(*this).Default(); } bool Double(double) { return static_cast(*this).Default(); } /// enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length) - bool Number(const Ch*, SizeType, bool) { return static_cast(*this).Default(); } + bool RawNumber(const Ch*, SizeType, bool) { return static_cast(*this).Default(); } bool String(const Ch*, SizeType, bool) { return static_cast(*this).Default(); } bool StartObject() { return static_cast(*this).Default(); } bool Key(const Ch* str, SizeType len, bool copy) { return static_cast(*this).String(str, len, copy); } @@ -1276,7 +1276,7 @@ private: s.Pop(); // Pop stack no matter if it will be used or not. const size_t length = s.Tell() - startOffset; - cont = handler.Number(head, length, (parseFlags & kParseInsituFlag) ? false : true); + cont = handler.RawNumber(head, length, (parseFlags & kParseInsituFlag) ? false : true); } else { diff --git a/include/rapidjson/schema.h b/include/rapidjson/schema.h index 7a362d5..752767e 100644 --- a/include/rapidjson/schema.h +++ b/include/rapidjson/schema.h @@ -183,7 +183,7 @@ public: return WriteNumber(n); } - bool Number(const Ch* str, SizeType len, bool) { + bool RawNumber(const Ch* str, SizeType len, bool) { WriteBuffer(kNumberType, str, len * sizeof(Ch)); return true; } diff --git a/include/rapidjson/writer.h b/include/rapidjson/writer.h index 7df5696..3957422 100644 --- a/include/rapidjson/writer.h +++ b/include/rapidjson/writer.h @@ -171,7 +171,7 @@ public: */ bool Double(double d) { Prefix(kNumberType); return WriteDouble(d); } - bool Number(const Ch* str, SizeType length, bool copy = false) { + bool RawNumber(const Ch* str, SizeType length, bool copy = false) { (void)copy; Prefix(kNumberType); return WriteString(str, length);