aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/nlists.adb
diff options
context:
space:
mode:
authorPiotr Trojanek <trojanek@adacore.com>2020-03-18 23:57:10 +0100
committerPierre-Marie de Rodat <derodat@adacore.com>2020-06-11 05:53:52 -0400
commitcbbe41d1f7b87e4f1889d0412ee46517bb7d5674 (patch)
tree629b3aedc9693e5675718e605d5c9cfdefd43fa5 /gcc/ada/nlists.adb
parentadffc3672314dc260d5c692d2dce81d42cdb22dc (diff)
downloadgcc-cbbe41d1f7b87e4f1889d0412ee46517bb7d5674.zip
gcc-cbbe41d1f7b87e4f1889d0412ee46517bb7d5674.tar.gz
gcc-cbbe41d1f7b87e4f1889d0412ee46517bb7d5674.tar.bz2
[Ada] Iterate with procedural version of Next routine where possible
2020-06-11 Piotr Trojanek <trojanek@adacore.com> gcc/ada/ * checks.adb, exp_ch7.adb, exp_ch9.adb, exp_smem.adb, lib.adb, nlists.adb, sem.adb, sem_aggr.adb, sem_ch3.adb, sem_ch6.adb, sem_ch8.adb, sem_dim.adb, sem_res.adb, sem_util.adb, sem_warn.adb: Replace uses of Next function with procedure.
Diffstat (limited to 'gcc/ada/nlists.adb')
-rw-r--r--gcc/ada/nlists.adb16
1 files changed, 8 insertions, 8 deletions
diff --git a/gcc/ada/nlists.adb b/gcc/ada/nlists.adb
index a51b191c..874d144 100644
--- a/gcc/ada/nlists.adb
+++ b/gcc/ada/nlists.adb
@@ -243,7 +243,7 @@ package body Nlists is
N := F;
loop
Set_List_Link (N, To);
- N := Next (N);
+ Next (N);
exit when No (N);
end loop;
@@ -530,7 +530,7 @@ package body Nlists is
loop
Set_List_Link (N, LC);
exit when N = L;
- N := Next (N);
+ Next (N);
end loop;
if Present (Before) then
@@ -597,7 +597,7 @@ package body Nlists is
loop
Set_List_Link (N, LC);
exit when N = L;
- N := Next (N);
+ Next (N);
end loop;
if Present (After) then
@@ -699,7 +699,7 @@ package body Nlists is
Node := First (List);
while Present (Node) loop
Result := Result + 1;
- Node := Next (Node);
+ Next (Node);
end loop;
return Result;
@@ -756,7 +756,7 @@ package body Nlists is
while Present (E) loop
Append (New_Copy (E), NL);
- E := Next (E);
+ Next (E);
end loop;
return NL;
@@ -784,7 +784,7 @@ package body Nlists is
Append (New_Copy (E), NL);
end if;
- E := Next (E);
+ Next (E);
end loop;
return NL;
@@ -990,7 +990,7 @@ package body Nlists is
begin
N := Node;
loop
- N := Next (N);
+ Next (N);
exit when not Nkind_In (N, N_Pragma, N_Null_Statement);
end loop;
@@ -1040,7 +1040,7 @@ package body Nlists is
begin
Elmt := First (List);
for J in 1 .. Index - 1 loop
- Elmt := Next (Elmt);
+ Next (Elmt);
end loop;
return Elmt;