Number() -> RawNumber() to avoid name clashes with the union Number
This commit is contained in:
parent
4f94ec9b0b
commit
2bbfe0d8a8
@ -2325,7 +2325,7 @@ public:
|
|||||||
bool Uint64(uint64_t i) { new (stack_.template Push<ValueType>()) ValueType(i); return true; }
|
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 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)
|
if (copy)
|
||||||
new (stack_.template Push<ValueType>()) ValueType(str, length, GetAllocator());
|
new (stack_.template Push<ValueType>()) ValueType(str, length, GetAllocator());
|
||||||
else
|
else
|
||||||
|
@ -171,7 +171,7 @@ concept Handler {
|
|||||||
bool Uint64(uint64_t i);
|
bool Uint64(uint64_t i);
|
||||||
bool Double(double d);
|
bool Double(double d);
|
||||||
/// enabled via kParseNumbersAsStringsFlag, string is not null-terminated (use length)
|
/// 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 String(const Ch* str, SizeType length, bool copy);
|
||||||
bool StartObject();
|
bool StartObject();
|
||||||
bool Key(const Ch* str, SizeType length, bool copy);
|
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 Uint64(uint64_t) { return static_cast<Override&>(*this).Default(); }
|
||||||
bool Double(double) { 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)
|
/// 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 String(const Ch*, SizeType, bool) { return static_cast<Override&>(*this).Default(); }
|
||||||
bool StartObject() { 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); }
|
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.
|
s.Pop(); // Pop stack no matter if it will be used or not.
|
||||||
const size_t length = s.Tell() - startOffset;
|
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
|
else
|
||||||
{
|
{
|
||||||
|
@ -183,7 +183,7 @@ public:
|
|||||||
return WriteNumber(n);
|
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));
|
WriteBuffer(kNumberType, str, len * sizeof(Ch));
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -171,7 +171,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
bool Double(double d) { Prefix(kNumberType); return WriteDouble(d); }
|
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;
|
(void)copy;
|
||||||
Prefix(kNumberType);
|
Prefix(kNumberType);
|
||||||
return WriteString(str, length);
|
return WriteString(str, length);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user