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
This commit is contained in:
parent
516fd7cedb
commit
8e361de1b0
2 changed files with 8 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
|||
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):
|
||||
|
|
|
@ -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];
|
||||
|
|
Loading…
Add table
Reference in a new issue