From 476ffa2fd272243275a74c36952f210267dc3088 Mon Sep 17 00:00:00 2001 From: "Albert Hung (Embedded)" Date: Thu, 17 Aug 2023 15:26:07 +0800 Subject: [PATCH] Rename to fix allocator shadowing The identifier 'allocator' in the RapidJSON StdAllocator class declaration shadows the identifier 'allocator' in the std::allocator class. To fix this, rename the 'allocator' identifier in the StdAllocator class declaration to a different name. --- include/rapidjson/allocators.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/include/rapidjson/allocators.h b/include/rapidjson/allocators.h index 35650af..275417b 100644 --- a/include/rapidjson/allocators.h +++ b/include/rapidjson/allocators.h @@ -497,9 +497,9 @@ public: #endif /* implicit */ - StdAllocator(const BaseAllocator& allocator) RAPIDJSON_NOEXCEPT : + StdAllocator(const BaseAllocator& baseAllocator) RAPIDJSON_NOEXCEPT : allocator_type(), - baseAllocator_(allocator) + baseAllocator_(baseAllocator) { } ~StdAllocator() RAPIDJSON_NOEXCEPT