summaryrefslogtreecommitdiff
path: root/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h')
-rw-r--r--graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h
index 12bc5bafcb..8918cf76fe 100644
--- a/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h
+++ b/graphics/asymptote/LspCpp/third_party/rapidjson/include/rapidjson/allocators.h
@@ -1,5 +1,5 @@
// Tencent is pleased to support the open source community by making RapidJSON available.
-//
+//
// Copyright (C) 2015 THL A29 Limited, a Tencent company, and Milo Yip.
//
// Licensed under the MIT License (the "License"); you may not use this file except
@@ -7,9 +7,9 @@
//
// http://opensource.org/licenses/MIT
//
-// Unless required by applicable law or agreed to in writing, software distributed
-// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
-// CONDITIONS OF ANY KIND, either express or implied. See the License for the
+// Unless required by applicable law or agreed to in writing, software distributed
+// under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
+// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
#ifndef RAPIDJSON_ALLOCATORS_H_
@@ -31,10 +31,10 @@ RAPIDJSON_NAMESPACE_BEGIN
/*! \class rapidjson::Allocator
\brief Concept for allocating, resizing and freeing memory block.
-
+
Note that Malloc() and Realloc() are non-static but Free() is static.
-
- So if an allocator need to support Free(), it needs to put its pointer in
+
+ So if an allocator need to support Free(), it needs to put its pointer in
the header of memory block.
\code
@@ -82,7 +82,7 @@ concept Allocator {
class CrtAllocator {
public:
static const bool kNeedFree = true;
- void* Malloc(size_t size) {
+ void* Malloc(size_t size) {
if (size) // behavior of malloc(0) is implementation defined.
return RAPIDJSON_MALLOC(size);
else
@@ -110,7 +110,7 @@ public:
// MemoryPoolAllocator
//! Default memory allocator used by the parser and DOM.
-/*! This allocator allocate memory blocks from pre-allocated memory chunks.
+/*! This allocator allocate memory blocks from pre-allocated memory chunks.
It does not free memory blocks. And Realloc() only allocate new memory.
@@ -166,7 +166,7 @@ public:
\param baseAllocator The allocator for allocating memory chunks.
*/
explicit
- MemoryPoolAllocator(size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) :
+ MemoryPoolAllocator(size_t chunkSize = kDefaultChunkCapacity, BaseAllocator* baseAllocator = 0) :
chunk_capacity_(chunkSize),
baseAllocator_(baseAllocator ? baseAllocator : RAPIDJSON_NEW(BaseAllocator)()),
shared_(static_cast<SharedData*>(baseAllocator_ ? baseAllocator_->Malloc(SIZEOF_SHARED_DATA + SIZEOF_CHUNK_HEADER) : 0))