Skip to content

Commit cefc846

Browse files
committed
Remove unused and deprecated pointer hint parameter from "allocate", as compilers warn about it loudly.
1 parent 84fa956 commit cefc846

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

include/boost/interprocess/allocators/adaptive_pool.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ class adaptive_pool
415415

416416
//!Allocate memory for an array of count elements.
417417
//!Throws boost::interprocess::bad_alloc if there is no enough memory
418-
pointer allocate(size_type count, cvoid_pointer hint = 0);
418+
pointer allocate(size_type count);
419419

420420
//!Deallocate allocated memory.
421421
//!Never throws

include/boost/interprocess/allocators/detail/allocator_common.hpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -533,9 +533,8 @@ class node_pool_allocation_impl
533533
//!Allocate memory for an array of count elements.
534534
//!Throws boost::interprocess::bad_alloc if there is no enough memory
535535
BOOST_INTERPROCESS_NODISCARD
536-
pointer allocate(size_type count, cvoid_pointer hint = 0)
536+
pointer allocate(size_type count)
537537
{
538-
(void)hint;
539538
typedef typename node_pool<0>::type node_pool_t;
540539
node_pool_t *pool = node_pool<0>::get(this->derived()->get_node_pool());
541540
if(size_overflows<sizeof(T)>(count)){
@@ -728,9 +727,8 @@ class cached_allocator_impl
728727
//!Allocate memory for an array of count elements.
729728
//!Throws boost::interprocess::bad_alloc if there is no enough memory
730729
BOOST_INTERPROCESS_NODISCARD
731-
pointer allocate(size_type count, cvoid_pointer hint = 0)
730+
pointer allocate(size_type count)
732731
{
733-
(void)hint;
734732
void * ret;
735733
if(size_overflows<sizeof(T)>(count)){
736734
throw bad_alloc();

0 commit comments

Comments
 (0)