diff mbox

[Ada] Navigate to next node in bucket when iterating

Message ID 20110829140443.GA24529@adacore.com
State New
Headers show

Commit Message

Arnaud Charlet Aug. 29, 2011, 2:04 p.m. UTC
There are two overloadings of Next. One is a selector function to return the
next node in the current bucket, the other navigates to the next element in the
container. The implementation of Generic_Iteration needs to call the former, as
it interrogates the items in each bucket, before moving on the next bucket.

Tested on x86_64-pc-linux-gnu, committed on trunk

2011-08-29  Matthew Heaney  <heaney@adacore.com>

	* a-chtgbo.adb (Generic_Iteration): Use correct overloading of Next.
diff mbox

Patch

Index: a-chtgbo.adb
===================================================================
--- a-chtgbo.adb	(revision 178228)
+++ a-chtgbo.adb	(working copy)
@@ -350,7 +350,7 @@ 
          Node := HT.Buckets (Indx);
          while Node /= 0 loop
             Process (Node);
-            Node := Next (HT, Node);
+            Node := Next (HT.Nodes (Node));
          end loop;
       end loop;
    end Generic_Iteration;