Fix -Wshadow warnings

This commit is contained in:
Ion Gaztañaga
2021-12-27 14:40:29 +01:00
parent 40735223d5
commit ea3521bf14
4 changed files with 8 additions and 9 deletions

View File

@ -394,9 +394,8 @@ struct node_alloc_holder
icont_iterator erase_range(const icont_iterator &first, const icont_iterator &last, version_2)
{
typedef typename NodeAlloc::multiallocation_chain multiallocation_chain;
NodeAlloc & nalloc = this->node_alloc();
multiallocation_chain chain;
typename NodeAlloc::multiallocation_chain chain;
allocator_destroyer_and_chain_builder<NodeAlloc> chain_builder(nalloc, chain);
icont_iterator ret_it = this->icont().erase_and_dispose(first, last, chain_builder);
nalloc.deallocate_individual(chain);

View File

@ -418,8 +418,8 @@ struct insert_return_type_base
{}
template<class RelatedIt, class RelatedNode>
insert_return_type_base(bool insert, RelatedIt it, BOOST_RV_REF(RelatedNode) node)
: inserted(insert), position(it), node(boost::move(node))
insert_return_type_base(bool insert, RelatedIt it, BOOST_RV_REF(RelatedNode) n)
: inserted(insert), position(it), node(boost::move(n))
{}
insert_return_type_base & operator=(BOOST_RV_REF(insert_return_type_base) other)

View File

@ -824,12 +824,12 @@ private:
{ return this->m_holder.steal_resources(x.m_holder); }
template<class AllocFwd>
BOOST_CONTAINER_FORCEINLINE vector(initial_capacity_t, pointer initial_memory, size_type capacity, BOOST_FWD_REF(AllocFwd) a)
: m_holder(initial_capacity_t(), initial_memory, capacity, ::boost::forward<AllocFwd>(a))
BOOST_CONTAINER_FORCEINLINE vector(initial_capacity_t, pointer initial_memory, size_type cap, BOOST_FWD_REF(AllocFwd) a)
: m_holder(initial_capacity_t(), initial_memory, cap, ::boost::forward<AllocFwd>(a))
{}
BOOST_CONTAINER_FORCEINLINE vector(initial_capacity_t, pointer initial_memory, size_type capacity)
: m_holder(initial_capacity_t(), initial_memory, capacity)
BOOST_CONTAINER_FORCEINLINE vector(initial_capacity_t, pointer initial_memory, size_type cap)
: m_holder(initial_capacity_t(), initial_memory, cap)
{}
#endif //#ifndef BOOST_CONTAINER_DOXYGEN_INVOKED

View File

@ -61,7 +61,7 @@ struct X;
template<typename T>
struct XRef
{
explicit XRef(T* ptr) : ptr(ptr) {}
explicit XRef(T* p) : ptr(p) {}
operator T*() const { return ptr; }
T* ptr;
};