From 8dfc97f5d6969507c30225ee795366a6c8dd1bc4 Mon Sep 17 00:00:00 2001 From: Milo Yip Date: Thu, 28 Aug 2014 20:03:03 +0800 Subject: [PATCH] Change PrettyWriter Allocator=MemoryPoolAllocator<> to StackAllocator = CrtAllocator Fixes #118 --- include/rapidjson/prettywriter.h | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/include/rapidjson/prettywriter.h b/include/rapidjson/prettywriter.h index eb778b3..f89be1b 100644 --- a/include/rapidjson/prettywriter.h +++ b/include/rapidjson/prettywriter.h @@ -35,12 +35,12 @@ namespace rapidjson { \tparam OutputStream Type of ouptut os. \tparam SourceEncoding Encoding of source string. \tparam TargetEncoding Encoding of output stream. - \tparam Allocator Type of allocator for allocating memory of stack. + \tparam StackAllocator Type of allocator for allocating memory of stack. */ -template, typename TargetEncoding = UTF8<>, typename Allocator = MemoryPoolAllocator<> > -class PrettyWriter : public Writer { +template, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator> +class PrettyWriter : public Writer { public: - typedef Writer Base; + typedef Writer Base; typedef typename Base::Ch Ch; //! Constructor @@ -48,7 +48,7 @@ public: \param allocator User supplied allocator. If it is null, it will create a private one. \param levelDepth Initial capacity of stack. */ - PrettyWriter(OutputStream& os, Allocator* allocator = 0, size_t levelDepth = Base::kDefaultLevelDepth) : + PrettyWriter(OutputStream& os, StackAllocator* allocator = 0, size_t levelDepth = Base::kDefaultLevelDepth) : Base(os, allocator, levelDepth), indentChar_(' '), indentCharCount_(4) {} //! Set custom indentation.