From 4f94ec9b0bc63f3de9d1f59b16a9cdf8e7532832 Mon Sep 17 00:00:00 2001 From: Sergey Kosarevsky Date: Sun, 28 Feb 2016 18:38:06 +0100 Subject: [PATCH] Added GenericDocument::Number() --- include/rapidjson/document.h | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/include/rapidjson/document.h b/include/rapidjson/document.h index be09be4..7b46873 100644 --- a/include/rapidjson/document.h +++ b/include/rapidjson/document.h @@ -2325,6 +2325,14 @@ 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) { + if (copy) + new (stack_.template Push()) ValueType(str, length, GetAllocator()); + else + new (stack_.template Push()) ValueType(str, length); + return true; + } + bool String(const Ch* str, SizeType length, bool copy) { if (copy) new (stack_.template Push()) ValueType(str, length, GetAllocator());