Mercurial > mxe-octave
view src/rapidjson-1-prettywriter.patch @ 6237:97ad836259c3
* src/of-fits-1-cross-fixes.patch: add -lz
author | John Donoghue <john.donoghue@ieee.org> |
---|---|
date | Fri, 27 May 2022 14:24:32 -0400 |
parents | 15ad3e21dc17 |
children |
line wrap: on
line source
From ac0fc79c76fc92783d2a5267082a1f8f9c28df22 Mon Sep 17 00:00:00 2001 From: Gustav <sir.gustav.the.coder@gmail.com> Date: Mon, 18 May 2020 14:06:39 +0200 Subject: [PATCH] Fixes issue #1718 --- include/rapidjson/writer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/rapidjson/writer.h b/include/rapidjson/writer.h index e7fb873a4..51dd86d58 100644 --- a/include/rapidjson/writer.h +++ b/include/rapidjson/writer.h @@ -283,6 +283,8 @@ class Writer { os_->Flush(); } + static const size_t kDefaultLevelDepth = 32; + protected: //! Information for each nested level struct Level { @@ -291,8 +293,6 @@ class Writer { bool inArray; //!< true if in array, otherwise in object }; - static const size_t kDefaultLevelDepth = 32; - bool WriteNull() { PutReserve(*os_, 4); PutUnsafe(*os_, 'n'); PutUnsafe(*os_, 'u'); PutUnsafe(*os_, 'l'); PutUnsafe(*os_, 'l'); return true; From d88be8ef1649eca4602348d1aab5c16c36f83d4f Mon Sep 17 00:00:00 2001 From: Milo Yip <miloyip@gmail.com> Date: Mon, 27 Mar 2017 14:05:03 +0800 Subject: [PATCH] Fix #905 unable to set writeFlags for PrettyWriter --- include/rapidjson/prettywriter.h | 2 +- test/unittest/prettywritertest.cpp | 43 ++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/include/rapidjson/prettywriter.h b/include/rapidjson/prettywriter.h index ef36a8c2a..98dfb3060 100644 --- a/include/rapidjson/prettywriter.h +++ b/include/rapidjson/prettywriter.h @@ -47,7 +47,7 @@ enum PrettyFormatOptions { template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator, unsigned writeFlags = kWriteDefaultFlags> class PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags> { public: - typedef Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator> Base; + typedef Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator, writeFlags> Base; typedef typename Base::Ch Ch; //! Constructor