Commit 8e361de1 by Jan Hubicka Committed by Jan Hubicka

Workaround bogus warning in fibonacci_heap<K,V>::consolidate.

	* fibonacci_heap.h (fibonacci_heap<K,V>::consolidate): Turn auto_vec
	to ordinary array.

From-SVN: r278504
parent 516fd7ce
2019-11-20 Jan Hubicka <jh@suse.cz>
* fibonacci_heap.h (fibonacci_heap<K,V>::consolidate): Turn auto_vec
to ordinary array.
2019-11-20 Jan Hubicka <jh@suse.cz>
* fibonacci_heap.h (fibonacci_heap<K,V>::fibonacci_heap):
Add allocator parameter.
(fibonacci_heap<K,V>::~fibonacci_heap): Optimize destruction.
......@@ -648,17 +648,18 @@ template<class K, class V>
void fibonacci_heap<K,V>::consolidate ()
{
const int D = 1 + 8 * sizeof (long);
auto_vec<fibonacci_node<K,V> *, D> a;
fibonacci_node<K,V> *a[D];
fibonacci_node<K,V> *w, *x, *y;
int i, d;
a.quick_grow_cleared (D);
memset (a, 0, sizeof (a));
while ((w = m_root) != NULL)
{
x = w;
remove_root (w);
d = x->m_degree;
gcc_checking_assert (d < D);
while (a[d] != NULL)
{
y = a[d];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment