From 8070183944f5457ed14918371e0a9025a365aaf8 Mon Sep 17 00:00:00 2001 From: Franz Detro Date: Mon, 11 Feb 2013 12:32:58 +0100 Subject: [PATCH] fix warnings in boost multi_index --- boost/multi_index/detail/index_matcher.hpp | 8 ++++---- boost/multi_index/ordered_index.hpp | 20 ++++++++++---------- 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/boost/multi_index/detail/index_matcher.hpp b/boost/multi_index/detail/index_matcher.hpp index 5828137..1c03144 100644 --- a/boost/multi_index/detail/index_matcher.hpp +++ b/boost/multi_index/detail/index_matcher.hpp @@ -132,17 +132,17 @@ protected: entries(),entries()+size_, entry(node),entry::less_by_node()); /* localize entry */ ent->ordered=false; - std::size_t n=ent->pos; /* get its position */ + std::size_t np=ent->pos; /* get its position */ entry dummy(0); - dummy.pile_top=n; + dummy.pile_top=np; entry* pile_ent= /* find the first available pile */ std::lower_bound( /* to stack the entry */ entries(),entries()+num_piles, dummy,entry::less_by_pile_top()); - pile_ent->pile_top=n; /* stack the entry */ + pile_ent->pile_top=np; /* stack the entry */ pile_ent->pile_top_entry=ent; /* if not the first pile, link entry to top of the preceding pile */ @@ -164,7 +164,7 @@ protected: */ entry* ent=entries()[num_piles-1].pile_top_entry; - for(std::size_t n=num_piles;n--;){ + for(std::size_t np=num_piles;np--;){ ent->ordered=true; ent=ent->previous; } diff --git a/boost/multi_index/ordered_index.hpp b/boost/multi_index/ordered_index.hpp index 20475e0..23308fb 100644 --- a/boost/multi_index/ordered_index.hpp +++ b/boost/multi_index/ordered_index.hpp @@ -438,9 +438,9 @@ public: template iterator find( - const CompatibleKey& x,const CompatibleCompare& comp)const + const CompatibleKey& x,const CompatibleCompare& comp_)const { - return make_iterator(ordered_index_find(root(),header(),key,x,comp)); + return make_iterator(ordered_index_find(root(),header(),key,x,comp_)); } template @@ -450,9 +450,9 @@ public: } template - size_type count(const CompatibleKey& x,const CompatibleCompare& comp)const + size_type count(const CompatibleKey& x,const CompatibleCompare& comp_)const { - std::pair p=equal_range(x,comp); + std::pair p=equal_range(x,comp_); size_type n=std::distance(p.first,p.second); return n; } @@ -466,10 +466,10 @@ public: template iterator lower_bound( - const CompatibleKey& x,const CompatibleCompare& comp)const + const CompatibleKey& x,const CompatibleCompare& comp_)const { return make_iterator( - ordered_index_lower_bound(root(),header(),key,x,comp)); + ordered_index_lower_bound(root(),header(),key,x,comp_)); } template @@ -481,10 +481,10 @@ public: template iterator upper_bound( - const CompatibleKey& x,const CompatibleCompare& comp)const + const CompatibleKey& x,const CompatibleCompare& comp_)const { return make_iterator( - ordered_index_upper_bound(root(),header(),key,x,comp)); + ordered_index_upper_bound(root(),header(),key,x,comp_)); } template @@ -499,10 +499,10 @@ public: template std::pair equal_range( - const CompatibleKey& x,const CompatibleCompare& comp)const + const CompatibleKey& x,const CompatibleCompare& comp_)const { std::pair p= - ordered_index_equal_range(root(),header(),key,x,comp); + ordered_index_equal_range(root(),header(),key,x,comp_); return std::pair( make_iterator(p.first),make_iterator(p.second)); } -- 1.7.11.1