aboutsummaryrefslogtreecommitdiffstats
path: root/src/grt/grt-algos.adb
diff options
context:
space:
mode:
authorTristan Gingold <tgingold@free.fr>2022-11-20 08:34:27 +0100
committerTristan Gingold <tgingold@free.fr>2022-11-20 08:34:27 +0100
commitbd43c44ab5216e53bddc0e5c33cf8976db4d54b3 (patch)
tree89326123c8c09003735853dd7023c0c1b7689fbe /src/grt/grt-algos.adb
parentbad897e392427190d2774269925e2bb21cf50a93 (diff)
downloadghdl-bd43c44ab5216e53bddc0e5c33cf8976db4d54b3.tar.gz
ghdl-bd43c44ab5216e53bddc0e5c33cf8976db4d54b3.tar.bz2
ghdl-bd43c44ab5216e53bddc0e5c33cf8976db4d54b3.zip
grt-algos: clarify the API
Diffstat (limited to 'src/grt/grt-algos.adb')
-rw-r--r--src/grt/grt-algos.adb3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/grt/grt-algos.adb b/src/grt/grt-algos.adb
index 6469e2b80..82c14bd8c 100644
--- a/src/grt/grt-algos.adb
+++ b/src/grt/grt-algos.adb
@@ -39,6 +39,9 @@ package body Grt.Algos is
end Bubble_Down;
begin
+ -- Note: if N < 2, there is nothing to sort. The loops are not
+ -- executed.
+
-- Heapify
for I in reverse 1 .. N / 2 loop
Bubble_Down (I, N);