Skip to content

Commit

Permalink
Rename to fix allocator shadowing
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
AlbertHungGarmin authored and miloyip committed Aug 21, 2023
1 parent 5e17dbe commit 476ffa2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions include/rapidjson/allocators.h
Original file line number Diff line number Diff line change
Expand Up @@ -497,9 +497,9 @@ class StdAllocator :
#endif

/* implicit */
StdAllocator(const BaseAllocator& allocator) RAPIDJSON_NOEXCEPT :
StdAllocator(const BaseAllocator& baseAllocator) RAPIDJSON_NOEXCEPT :
allocator_type(),
baseAllocator_(allocator)
baseAllocator_(baseAllocator)
{ }

~StdAllocator() RAPIDJSON_NOEXCEPT
Expand Down

0 comments on commit 476ffa2

Please sign in to comment.