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:
|
| 132 | 132 | entries(),entries()+size_, |
| 133 | 133 | entry(node),entry::less_by_node()); /* localize entry */ |
| 134 | 134 | ent->ordered=false; |
| 135 | | std::size_t n=ent->pos; /* get its position */ |
| | 135 | std::size_t np=ent->pos; /* get its position */ |
| 136 | 136 | |
| 137 | 137 | entry dummy(0); |
| 138 | | dummy.pile_top=n; |
| | 138 | dummy.pile_top=np; |
| 139 | 139 | |
| 140 | 140 | entry* pile_ent= /* find the first available pile */ |
| 141 | 141 | std::lower_bound( /* to stack the entry */ |
| 142 | 142 | entries(),entries()+num_piles, |
| 143 | 143 | dummy,entry::less_by_pile_top()); |
| 144 | 144 | |
| 145 | | pile_ent->pile_top=n; /* stack the entry */ |
| | 145 | pile_ent->pile_top=np; /* stack the entry */ |
| 146 | 146 | pile_ent->pile_top_entry=ent; |
| 147 | 147 | |
| 148 | 148 | /* if not the first pile, link entry to top of the preceding pile */ |
| … |
… |
protected:
|
| 164 | 164 | */ |
| 165 | 165 | |
| 166 | 166 | 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--;){ |
| 168 | 168 | ent->ordered=true; |
| 169 | 169 | ent=ent->previous; |
| 170 | 170 | } |
diff --git a/boost/multi_index/ordered_index.hpp b/boost/multi_index/ordered_index.hpp
index 20475e0..23308fb 100644
|
a
|
b
|
public:
|
| 438 | 438 | |
| 439 | 439 | template<typename CompatibleKey,typename CompatibleCompare> |
| 440 | 440 | iterator find( |
| 441 | | const CompatibleKey& x,const CompatibleCompare& comp)const |
| | 441 | const CompatibleKey& x,const CompatibleCompare& comp_)const |
| 442 | 442 | { |
| 443 | | return make_iterator(ordered_index_find(root(),header(),key,x,comp)); |
| | 443 | return make_iterator(ordered_index_find(root(),header(),key,x,comp_)); |
| 444 | 444 | } |
| 445 | 445 | |
| 446 | 446 | template<typename CompatibleKey> |
| … |
… |
public:
|
| 450 | 450 | } |
| 451 | 451 | |
| 452 | 452 | 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 |
| 454 | 454 | { |
| 455 | | std::pair<iterator,iterator> p=equal_range(x,comp); |
| | 455 | std::pair<iterator,iterator> p=equal_range(x,comp_); |
| 456 | 456 | size_type n=std::distance(p.first,p.second); |
| 457 | 457 | return n; |
| 458 | 458 | } |
| … |
… |
public:
|
| 466 | 466 | |
| 467 | 467 | template<typename CompatibleKey,typename CompatibleCompare> |
| 468 | 468 | iterator lower_bound( |
| 469 | | const CompatibleKey& x,const CompatibleCompare& comp)const |
| | 469 | const CompatibleKey& x,const CompatibleCompare& comp_)const |
| 470 | 470 | { |
| 471 | 471 | return make_iterator( |
| 472 | | ordered_index_lower_bound(root(),header(),key,x,comp)); |
| | 472 | ordered_index_lower_bound(root(),header(),key,x,comp_)); |
| 473 | 473 | } |
| 474 | 474 | |
| 475 | 475 | template<typename CompatibleKey> |
| … |
… |
public:
|
| 481 | 481 | |
| 482 | 482 | template<typename CompatibleKey,typename CompatibleCompare> |
| 483 | 483 | iterator upper_bound( |
| 484 | | const CompatibleKey& x,const CompatibleCompare& comp)const |
| | 484 | const CompatibleKey& x,const CompatibleCompare& comp_)const |
| 485 | 485 | { |
| 486 | 486 | return make_iterator( |
| 487 | | ordered_index_upper_bound(root(),header(),key,x,comp)); |
| | 487 | ordered_index_upper_bound(root(),header(),key,x,comp_)); |
| 488 | 488 | } |
| 489 | 489 | |
| 490 | 490 | template<typename CompatibleKey> |
| … |
… |
public:
|
| 499 | 499 | |
| 500 | 500 | template<typename CompatibleKey,typename CompatibleCompare> |
| 501 | 501 | std::pair<iterator,iterator> equal_range( |
| 502 | | const CompatibleKey& x,const CompatibleCompare& comp)const |
| | 502 | const CompatibleKey& x,const CompatibleCompare& comp_)const |
| 503 | 503 | { |
| 504 | 504 | 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_); |
| 506 | 506 | return std::pair<iterator,iterator>( |
| 507 | 507 | make_iterator(p.first),make_iterator(p.second)); |
| 508 | 508 | } |