Skip to content

Commit

Permalink
Revert "Update allocators.h"
Browse files Browse the repository at this point in the history
This reverts commit 22a62fc.
  • Loading branch information
bobbyg603 committed Aug 24, 2022
1 parent 189bb40 commit 9928ca8
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions include/rapidjson/allocators.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
#include "internal/meta.h"

#include <memory>
#include <limits>

#if RAPIDJSON_HAS_CXX11
#include <type_traits>
Expand Down Expand Up @@ -434,7 +433,7 @@ namespace internal {
template<typename T, typename A>
inline T* Realloc(A& a, T* old_p, size_t old_n, size_t new_n)
{
RAPIDJSON_NOEXCEPT_ASSERT(old_n <= std::numeric_limits<size_t>::max() / sizeof(T) && new_n <= std::numeric_limits<size_t>::max() / sizeof(T));
RAPIDJSON_NOEXCEPT_ASSERT(old_n <= SIZE_MAX / sizeof(T) && new_n <= SIZE_MAX / sizeof(T));
return static_cast<T*>(a.Realloc(old_p, old_n * sizeof(T), new_n * sizeof(T)));
}

Expand Down

0 comments on commit 9928ca8

Please sign in to comment.