Ticket #8034: multi_index.diff

File multi_index.diff, 4.2 KB (added by Franz Detro <franz.detro@…>, 10 years ago)
  • boost/multi_index/detail/index_matcher.hpp

    From 8070183944f5457ed14918371e0a9025a365aaf8 Mon Sep 17 00:00:00 2001
    From: Franz Detro <franz.detro@native-instruments.de>
    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 b protected:  
    132132        entries(),entries()+size_,
    133133        entry(node),entry::less_by_node()); /* localize entry */
    134134    ent->ordered=false;
    135     std::size_t n=ent->pos;                 /* get its position */
     135    std::size_t np=ent->pos;                 /* get its position */
    136136
    137137    entry dummy(0);
    138     dummy.pile_top=n;
     138    dummy.pile_top=np;
    139139
    140140    entry* pile_ent=                        /* find the first available pile */
    141141      std::lower_bound(                     /* to stack the entry            */
    142142        entries(),entries()+num_piles,
    143143        dummy,entry::less_by_pile_top());
    144144
    145     pile_ent->pile_top=n;                   /* stack the entry */
     145    pile_ent->pile_top=np;                   /* stack the entry */
    146146    pile_ent->pile_top_entry=ent;       
    147147
    148148    /* if not the first pile, link entry to top of the preceding pile */
    protected:  
    164164       */
    165165
    166166      entry* ent=entries()[num_piles-1].pile_top_entry;
    167       for(std::size_t n=num_piles;n--;){
     167      for(std::size_t np=num_piles;np--;){
    168168        ent->ordered=true;
    169169        ent=ent->previous;
    170170      }
  • boost/multi_index/ordered_index.hpp

    diff --git a/boost/multi_index/ordered_index.hpp b/boost/multi_index/ordered_index.hpp
    index 20475e0..23308fb 100644
    a b public:  
    438438
    439439  template<typename CompatibleKey,typename CompatibleCompare>
    440440  iterator find(
    441     const CompatibleKey& x,const CompatibleCompare& comp)const
     441    const CompatibleKey& x,const CompatibleCompare& comp_)const
    442442  {
    443     return make_iterator(ordered_index_find(root(),header(),key,x,comp));
     443    return make_iterator(ordered_index_find(root(),header(),key,x,comp_));
    444444  }
    445445
    446446  template<typename CompatibleKey>
    public:  
    450450  }
    451451
    452452  template<typename CompatibleKey,typename CompatibleCompare>
    453   size_type count(const CompatibleKey& x,const CompatibleCompare& comp)const
     453  size_type count(const CompatibleKey& x,const CompatibleCompare& comp_)const
    454454  {
    455     std::pair<iterator,iterator> p=equal_range(x,comp);
     455    std::pair<iterator,iterator> p=equal_range(x,comp_);
    456456    size_type n=std::distance(p.first,p.second);
    457457    return n;
    458458  }
    public:  
    466466
    467467  template<typename CompatibleKey,typename CompatibleCompare>
    468468  iterator lower_bound(
    469     const CompatibleKey& x,const CompatibleCompare& comp)const
     469    const CompatibleKey& x,const CompatibleCompare& comp_)const
    470470  {
    471471    return make_iterator(
    472       ordered_index_lower_bound(root(),header(),key,x,comp));
     472      ordered_index_lower_bound(root(),header(),key,x,comp_));
    473473  }
    474474
    475475  template<typename CompatibleKey>
    public:  
    481481
    482482  template<typename CompatibleKey,typename CompatibleCompare>
    483483  iterator upper_bound(
    484     const CompatibleKey& x,const CompatibleCompare& comp)const
     484    const CompatibleKey& x,const CompatibleCompare& comp_)const
    485485  {
    486486    return make_iterator(
    487       ordered_index_upper_bound(root(),header(),key,x,comp));
     487      ordered_index_upper_bound(root(),header(),key,x,comp_));
    488488  }
    489489
    490490  template<typename CompatibleKey>
    public:  
    499499
    500500  template<typename CompatibleKey,typename CompatibleCompare>
    501501  std::pair<iterator,iterator> equal_range(
    502     const CompatibleKey& x,const CompatibleCompare& comp)const
     502    const CompatibleKey& x,const CompatibleCompare& comp_)const
    503503  {
    504504    std::pair<node_type*,node_type*> p=
    505       ordered_index_equal_range(root(),header(),key,x,comp);
     505      ordered_index_equal_range(root(),header(),key,x,comp_);
    506506    return std::pair<iterator,iterator>(
    507507      make_iterator(p.first),make_iterator(p.second));
    508508  }