|
Boost-Commit : |
Subject: [Boost-commit] svn:boost r75826 - in trunk/boost/heap: . detail
From: tim_at_[hidden]
Date: 2011-12-06 11:59:04
Author: timblechmann
Date: 2011-12-06 11:59:03 EST (Tue, 06 Dec 2011)
New Revision: 75826
URL: http://svn.boost.org/trac/boost/changeset/75826
Log:
heap: silence some warnings
Text files modified:
trunk/boost/heap/binomial_heap.hpp | 5 +----
trunk/boost/heap/detail/mutable_heap.hpp | 6 +++---
trunk/boost/heap/heap_concepts.hpp | 10 ++++++----
3 files changed, 10 insertions(+), 11 deletions(-)
Modified: trunk/boost/heap/binomial_heap.hpp
==============================================================================
--- trunk/boost/heap/binomial_heap.hpp (original)
+++ trunk/boost/heap/binomial_heap.hpp 2011-12-06 11:59:03 EST (Tue, 06 Dec 2011)
@@ -619,7 +619,6 @@
BOOST_HEAP_ASSERT (!rhs.empty());
node_list_iterator this_iterator = trees.begin();
- node_list_iterator rhs_iterator = rhs.trees.begin();
node_pointer carry_node = NULL;
while (!rhs.trees.empty()) {
@@ -745,7 +744,6 @@
{
while (n->parent) {
node_pointer parent = n->parent;
- int parent_children = parent->child_count();
node_pointer grand_parent = parent->parent;
if (cmp(n->value, parent->value))
return;
@@ -764,8 +762,7 @@
trees.insert(it, *n);
}
n->add_child(parent);
- int n_children = n->child_count();
- BOOST_HEAP_ASSERT(parent_children == n_children);
+ BOOST_HEAP_ASSERT(parent->child_count() == n->child_count());
}
}
Modified: trunk/boost/heap/detail/mutable_heap.hpp
==============================================================================
--- trunk/boost/heap/detail/mutable_heap.hpp (original)
+++ trunk/boost/heap/detail/mutable_heap.hpp 2011-12-06 11:59:03 EST (Tue, 06 Dec 2011)
@@ -214,15 +214,15 @@
public:
ordered_iterator(void):
- adaptor_type(0), q_(NULL), unvisited_nodes(indirect_cmp())
+ adaptor_type(0), unvisited_nodes(indirect_cmp()), q_(NULL)
{}
ordered_iterator(const priority_queue_mutable_wrapper * q, indirect_cmp const & cmp):
- adaptor_type(0), q_(q), unvisited_nodes(cmp)
+ adaptor_type(0), unvisited_nodes(cmp), q_(q)
{}
ordered_iterator(const_list_iterator it, const priority_queue_mutable_wrapper * q, indirect_cmp const & cmp):
- adaptor_type(it), q_(q), unvisited_nodes(cmp)
+ adaptor_type(it), unvisited_nodes(cmp), q_(q)
{
if (it != q->objects.end())
discover_nodes(it);
Modified: trunk/boost/heap/heap_concepts.hpp
==============================================================================
--- trunk/boost/heap/heap_concepts.hpp (original)
+++ trunk/boost/heap/heap_concepts.hpp 2011-12-06 11:59:03 EST (Tue, 06 Dec 2011)
@@ -46,18 +46,20 @@
v = c.top();
c.pop();
- value_compare cmp = c.value_comp();
+ cmp = c.value_comp();
// verify tags
- bool has_ordered_iterators = C::has_ordered_iterators;
- bool is_mergable = C::is_mergable;
- bool is_stable = C::is_stable;
+ has_ordered_iterators = C::has_ordered_iterators;
+ is_mergable = C::is_mergable;
+ is_stable = C::is_stable;
}
private:
C c, c2;
allocator_type a;
typename C::value_type v;
+ value_compare cmp;
+ bool has_ordered_iterators, is_mergable, is_stable;
};
template <class C>
Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk