Fix shadowing warnings in foa.hpp

This commit is contained in:
Christian Mazakas
2022-09-26 11:40:47 -07:00
parent ad352a6703
commit 5d34b137a3

View File

@ -256,7 +256,7 @@ struct pow2_size_policy
struct pow2_quadratic_prober struct pow2_quadratic_prober
{ {
pow2_quadratic_prober(std::size_t pos):pos{pos}{} pow2_quadratic_prober(std::size_t _pos):pos{_pos}{}
inline std::size_t get()const{return pos;} inline std::size_t get()const{return pos;}
@ -305,9 +305,9 @@ private:
template<typename,typename,bool> friend class table_iterator; template<typename,typename,bool> friend class table_iterator;
template<typename,typename,typename,typename> friend class table; template<typename,typename,typename,typename> friend class table;
table_iterator(Group* pg,std::size_t n,const Value* p): table_iterator(Group* pg,std::size_t n,const Value* _p):
pc{reinterpret_cast<unsigned char*>(const_cast<Group*>(pg))+n}, pc{reinterpret_cast<unsigned char*>(const_cast<Group*>(pg))+n},
p{const_cast<Value*>(p)} p{const_cast<Value*>(_p)}
{} {}
inline std::size_t rebase() noexcept inline std::size_t rebase() noexcept
@ -378,9 +378,9 @@ public:
const_iterator>::type; const_iterator>::type;
table( table(
std::size_t n=0,const Hash& h=Hash(),const Pred& pred=Pred(), std::size_t n=0,const Hash& _h=Hash(),const Pred& _pred=Pred(),
const Allocator& al=Allocator()): const Allocator& _al=Allocator()):
h{h},pred{pred},al{al},size_{0},arrays{new_arrays(n)},ml{max_load()} h{_h},pred{_pred},al{_al},size_{0},arrays{new_arrays(n)},ml{max_load()}
{} {}
table(const table& x):table(x,x.al){} table(const table& x):table(x,x.al){}
@ -399,8 +399,8 @@ public:
x.ml=x.max_load(); x.ml=x.max_load();
} }
table(const table& x,const Allocator& al): table(const table& x,const Allocator& _al):
h{x.h},pred{x.pred},al{al},size_{0}, h{x.h},pred{x.pred},al{_al},size_{0},
arrays{new_arrays(std::size_t(std::ceil(x.size()/mlf)))}, arrays{new_arrays(std::size_t(std::ceil(x.size()/mlf)))},
ml{max_load()} ml{max_load()}
{ {
@ -416,8 +416,8 @@ public:
BOOST_CATCH_END BOOST_CATCH_END
} }
table(table&& x,const Allocator& al): table(table&& x,const Allocator& _al):
table{0,std::move(x.h),std::move(x.pred),al} table{0,std::move(x.h),std::move(x.pred),_al}
{ {
if(al==x.al){ if(al==x.al){
size_=x.size_; size_=x.size_;
@ -852,8 +852,8 @@ private:
for(std::size_t pos=0;;++pos,++pg){ for(std::size_t pos=0;;++pos,++pg){
auto mask=pg->match_occupied(); auto mask=pg->match_occupied();
while(mask){ while(mask){
auto n=unchecked_countr_zero(mask); auto nz=unchecked_countr_zero(mask);
pg->reset(n); pg->reset(nz);
if(!(--num_tx))goto continue_; if(!(--num_tx))goto continue_;
} }
} }