aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaire Dross <dross@adacore.com>2019-09-18 08:31:32 +0000
committerPierre-Marie de Rodat <pmderodat@gcc.gnu.org>2019-09-18 08:31:32 +0000
commit2b6cd962513387303661614b292397cb6432590c (patch)
tree84e895553b5adc6f6fb6884b44894d0512cbda31
parent2778553904f1653be5f90679570f8a60eabf2cfc (diff)
downloadgcc-2b6cd962513387303661614b292397cb6432590c.zip
gcc-2b6cd962513387303661614b292397cb6432590c.tar.gz
gcc-2b6cd962513387303661614b292397cb6432590c.tar.bz2
[Ada] Fix style issues in functional maps
Rename global constants from I to J. No functional changes. 2019-09-18 Claire Dross <dross@adacore.com> gcc/ada/ * libgnat/a-cofuma.adb (Remove, Elements_Equal_Except, Keys_Included, Keys_Included_Except): Rename loop indexes and global constants from I to J. From-SVN: r275838
-rw-r--r--gcc/ada/ChangeLog6
-rw-r--r--gcc/ada/libgnat/a-cofuma.adb30
2 files changed, 21 insertions, 15 deletions
diff --git a/gcc/ada/ChangeLog b/gcc/ada/ChangeLog
index 75ceaf1..8906ea1 100644
--- a/gcc/ada/ChangeLog
+++ b/gcc/ada/ChangeLog
@@ -1,3 +1,9 @@
+2019-09-18 Claire Dross <dross@adacore.com>
+
+ * libgnat/a-cofuma.adb (Remove, Elements_Equal_Except,
+ Keys_Included, Keys_Included_Except): Rename loop indexes and
+ global constants from I to J.
+
2019-09-18 Arnaud Charlet <charlet@adacore.com>
* exp_unst.adb (Unnest_Subprograms): Refine previous change.
diff --git a/gcc/ada/libgnat/a-cofuma.adb b/gcc/ada/libgnat/a-cofuma.adb
index d963f6e..e8da187 100644
--- a/gcc/ada/libgnat/a-cofuma.adb
+++ b/gcc/ada/libgnat/a-cofuma.adb
@@ -88,15 +88,15 @@ package body Ada.Containers.Functional_Maps with SPARK_Mode => Off is
New_Key : Key_Type) return Boolean
is
begin
- for I in 1 .. Length (Left.Keys) loop
+ for J in 1 .. Length (Left.Keys) loop
declare
- K : constant Key_Type := Get (Left.Keys, I);
+ K : constant Key_Type := Get (Left.Keys, J);
begin
if not Equivalent_Keys (K, New_Key)
and then
(Find (Right.Keys, K) = 0
or else Get (Right.Elements, Find (Right.Keys, K)) /=
- Get (Left.Elements, I))
+ Get (Left.Elements, J))
then
return False;
end if;
@@ -112,16 +112,16 @@ package body Ada.Containers.Functional_Maps with SPARK_Mode => Off is
Y : Key_Type) return Boolean
is
begin
- for I in 1 .. Length (Left.Keys) loop
+ for J in 1 .. Length (Left.Keys) loop
declare
- K : constant Key_Type := Get (Left.Keys, I);
+ K : constant Key_Type := Get (Left.Keys, J);
begin
if not Equivalent_Keys (K, X)
and then not Equivalent_Keys (K, Y)
and then
(Find (Right.Keys, K) = 0
or else Get (Right.Elements, Find (Right.Keys, K)) /=
- Get (Left.Elements, I))
+ Get (Left.Elements, J))
then
return False;
end if;
@@ -173,9 +173,9 @@ package body Ada.Containers.Functional_Maps with SPARK_Mode => Off is
function Keys_Included (Left : Map; Right : Map) return Boolean is
begin
- for I in 1 .. Length (Left.Keys) loop
+ for J in 1 .. Length (Left.Keys) loop
declare
- K : constant Key_Type := Get (Left.Keys, I);
+ K : constant Key_Type := Get (Left.Keys, J);
begin
if Find (Right.Keys, K) = 0 then
return False;
@@ -196,9 +196,9 @@ package body Ada.Containers.Functional_Maps with SPARK_Mode => Off is
New_Key : Key_Type) return Boolean
is
begin
- for I in 1 .. Length (Left.Keys) loop
+ for J in 1 .. Length (Left.Keys) loop
declare
- K : constant Key_Type := Get (Left.Keys, I);
+ K : constant Key_Type := Get (Left.Keys, J);
begin
if not Equivalent_Keys (K, New_Key)
and then Find (Right.Keys, K) = 0
@@ -218,9 +218,9 @@ package body Ada.Containers.Functional_Maps with SPARK_Mode => Off is
Y : Key_Type) return Boolean
is
begin
- for I in 1 .. Length (Left.Keys) loop
+ for J in 1 .. Length (Left.Keys) loop
declare
- K : constant Key_Type := Get (Left.Keys, I);
+ K : constant Key_Type := Get (Left.Keys, J);
begin
if not Equivalent_Keys (K, X)
and then not Equivalent_Keys (K, Y)
@@ -248,11 +248,11 @@ package body Ada.Containers.Functional_Maps with SPARK_Mode => Off is
------------
function Remove (Container : Map; Key : Key_Type) return Map is
- I : constant Extended_Index := Find (Container.Keys, Key);
+ J : constant Extended_Index := Find (Container.Keys, Key);
begin
return
- (Keys => Remove (Container.Keys, I),
- Elements => Remove (Container.Elements, I));
+ (Keys => Remove (Container.Keys, J),
+ Elements => Remove (Container.Elements, J));
end Remove;
---------------