From 6ef791c7150acfc466eb575e45f5107c80fc3ca0 Mon Sep 17 00:00:00 2001 From: Glen Fernandes Date: Sun, 5 Mar 2017 22:07:58 -0500 Subject: [PATCH] Rename identifiers in allocate and deallocate --- include/boost/smart_ptr/allocate_shared_array.hpp | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/include/boost/smart_ptr/allocate_shared_array.hpp b/include/boost/smart_ptr/allocate_shared_array.hpp index 2028795..b43b43d 100644 --- a/include/boost/smart_ptr/allocate_shared_array.hpp +++ b/include/boost/smart_ptr/allocate_shared_array.hpp @@ -666,19 +666,17 @@ public: value_type* allocate(std::size_t count) { type_allocator allocator(allocator_); - std::size_t head = sp_align(count); - std::size_t tail = sizeof(T) * size_; - std::size_t size = sp_types(head + tail); + std::size_t node = sp_align(count); + std::size_t size = sp_types(node + sizeof(T) * size_); type* address = allocator.allocate(size); - *result_ = reinterpret_cast(address) + head; + *result_ = reinterpret_cast(address) + node; return reinterpret_cast(address); } void deallocate(value_type* value, std::size_t count) { type_allocator allocator(allocator_); - std::size_t head = sp_align(count); - std::size_t tail = sizeof(T) * size_; - std::size_t size = sp_types(head + tail); + std::size_t node = sp_align(count); + std::size_t size = sp_types(node + sizeof(T) * size_); allocator.deallocate(reinterpret_cast(value), size); }