diff options
author | Milo Yip <miloyip@gmail.com> | 2014-08-28 16:03:03 +0400 |
---|---|---|
committer | Milo Yip <miloyip@gmail.com> | 2014-08-28 16:03:03 +0400 |
commit | 8dfc97f5d6969507c30225ee795366a6c8dd1bc4 (patch) | |
tree | 353c5428bd083683a3bd2a69980914bb485d78e8 /include/rapidjson/prettywriter.h | |
parent | b5928618d4a5a6be02d5cf79612b84420b853074 (diff) |
Change PrettyWriter Allocator=MemoryPoolAllocator<> to StackAllocator = CrtAllocator
Fixes #118
Diffstat (limited to 'include/rapidjson/prettywriter.h')
-rw-r--r-- | include/rapidjson/prettywriter.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/rapidjson/prettywriter.h b/include/rapidjson/prettywriter.h index eb778b31..f89be1b1 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 OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename Allocator = MemoryPoolAllocator<> >
-class PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding, Allocator> {
+template<typename OutputStream, typename SourceEncoding = UTF8<>, typename TargetEncoding = UTF8<>, typename StackAllocator = CrtAllocator>
+class PrettyWriter : public Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator> {
public:
- typedef Writer<OutputStream, SourceEncoding, TargetEncoding, Allocator> Base;
+ typedef Writer<OutputStream, SourceEncoding, TargetEncoding, StackAllocator> 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.
|