Commit 2bbfe0d8 authored by Sergey Kosarevsky's avatar Sergey Kosarevsky

Number() -> RawNumber() to avoid name clashes with the union Number

parent 4f94ec9b
......@@ -2325,7 +2325,7 @@ public:
bool Uint64(uint64_t i) { new (stack_.template Push<ValueType>()) ValueType(i); return true; }
bool Double(double d) { new (stack_.template Push<ValueType>()) 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>()) ValueType(str, length, GetAllocator());
else
......
......@@ -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<Override&>(*this).Default(); }
bool Double(double) { return static_cast<Override&>(*this).Default(); }
/// enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length)
bool Number(const Ch*, SizeType, bool) { return static_cast<Override&>(*this).Default(); }
bool RawNumber(const Ch*, SizeType, bool) { return static_cast<Override&>(*this).Default(); }
bool String(const Ch*, SizeType, bool) { return static_cast<Override&>(*this).Default(); }
bool StartObject() { return static_cast<Override&>(*this).Default(); }
bool Key(const Ch* str, SizeType len, bool copy) { return static_cast<Override&>(*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
{
......
......@@ -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;
}
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment