diff -r 096d83158d41 -r 81b47fc5c444 lemon/radix_heap.h --- a/lemon/radix_heap.h Fri Mar 02 17:56:22 2007 +0000 +++ b/lemon/radix_heap.h Fri Mar 02 18:04:28 2007 +0000 @@ -150,12 +150,12 @@ private: - bool upper(int box, Prio prio) { - return prio < boxes[box].min; + bool upper(int box, Prio pr) { + return pr < boxes[box].min; } - bool lower(int box, Prio prio) { - return prio >= boxes[box].min + boxes[box].size; + bool lower(int box, Prio pr) { + return pr >= boxes[box].min + boxes[box].size; } /// \brief Remove item from the box list. @@ -187,8 +187,8 @@ /// \brief Add a new box to the box list. void extend() { int min = boxes.back().min + boxes.back().size; - int size = 2 * boxes.back().size; - boxes.push_back(RadixBox(min, size)); + int bs = 2 * boxes.back().size; + boxes.push_back(RadixBox(min, bs)); } /// \brief Move an item up into the proper box. @@ -200,9 +200,9 @@ } /// \brief Find up the proper box for the item with the given prio. - int findUp(int start, int prio) { - while (lower(start, prio)) { - if (++start == (int)boxes.size()) { + int findUp(int start, int pr) { + while (lower(start, pr)) { + if (++start == int(boxes.size())) { extend(); } } @@ -218,8 +218,8 @@ } /// \brief Find up the proper box for the item with the given prio. - int findDown(int start, int prio) { - while (upper(start, prio)) { + int findDown(int start, int pr) { + while (upper(start, pr)) { if (--start < 0) throw UnderFlowPriorityError(); } return start; @@ -260,7 +260,7 @@ } void relocate_last(int index) { - if (index != (int)data.size() - 1) { + if (index != int(data.size()) - 1) { data[index] = data.back(); if (data[index].prev != -1) { data[data[index].prev].next = index;