aboutsummaryrefslogtreecommitdiff
path: root/gcc/ada/a-cfhama.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2014-02-24 17:58:19 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2014-02-24 17:58:19 +0100
commit1b31321b1834aac1bd455e5a457145827dee562f (patch)
tree1add74aa9da3e051e5836c81c36ab340e705ba01 /gcc/ada/a-cfhama.adb
parent2810861847cca82646c1c7e14249fe198acbbc0f (diff)
downloadgcc-1b31321b1834aac1bd455e5a457145827dee562f.zip
gcc-1b31321b1834aac1bd455e5a457145827dee562f.tar.gz
gcc-1b31321b1834aac1bd455e5a457145827dee562f.tar.bz2
[multiple changes]
2014-02-24 Robert Dewar <dewar@adacore.com> * a-direct.adb, sem_ch5.adb, a-cfdlli.adb, a-cfhase.adb, a-tags.adb, s-filatt.ads, a-cforma.adb, sem_ch6.adb, g-socthi-mingw.adb, a-cfhama.adb, a-cforse.adb, a-cofove.adb: Minor reformatting and code reorganization. 2014-02-24 Thomas Quinot <quinot@adacore.com> * Make-generated.in (OSCONS_CPP, OSCONS_EXTRACT): Make sure that the source directory containing s-oscons-tmplt.c is on the include path, so that all internal header files are available. From-SVN: r208081
Diffstat (limited to 'gcc/ada/a-cfhama.adb')
-rw-r--r--gcc/ada/a-cfhama.adb40
1 files changed, 20 insertions, 20 deletions
diff --git a/gcc/ada/a-cfhama.adb b/gcc/ada/a-cfhama.adb
index a8fe127..ea506d8 100644
--- a/gcc/ada/a-cfhama.adb
+++ b/gcc/ada/a-cfhama.adb
@@ -242,26 +242,26 @@ package body Ada.Containers.Formal_Hashed_Maps is
function Current_To_Last (Container : Map; Current : Cursor) return Map is
Curs : Cursor := First (Container);
C : Map (Container.Capacity, Container.Modulus) :=
- Copy (Container, Container.Capacity);
+ Copy (Container, Container.Capacity);
Node : Count_Type;
begin
if Curs = No_Element then
Clear (C);
return C;
- end if;
- if Current /= No_Element and not Has_Element (Container, Current) then
+ elsif Current /= No_Element and not Has_Element (Container, Current) then
raise Constraint_Error;
- end if;
- while Curs.Node /= Current.Node loop
- Node := Curs.Node;
- Delete (C, Curs);
- Curs := Next (Container, (Node => Node));
- end loop;
+ else
+ while Curs.Node /= Current.Node loop
+ Node := Curs.Node;
+ Delete (C, Curs);
+ Curs := Next (Container, (Node => Node));
+ end loop;
- return C;
+ return C;
+ end if;
end Current_To_Last;
---------------------
@@ -467,7 +467,7 @@ package body Ada.Containers.Formal_Hashed_Maps is
Current : Cursor) return Map is
Curs : Cursor;
C : Map (Container.Capacity, Container.Modulus) :=
- Copy (Container, Container.Capacity);
+ Copy (Container, Container.Capacity);
Node : Count_Type;
begin
@@ -475,19 +475,19 @@ package body Ada.Containers.Formal_Hashed_Maps is
if Curs = No_Element then
return C;
- end if;
- if not Has_Element (Container, Curs) then
+ elsif not Has_Element (Container, Curs) then
raise Constraint_Error;
- end if;
- while Curs.Node /= 0 loop
- Node := Curs.Node;
- Delete (C, Curs);
- Curs := Next (Container, (Node => Node));
- end loop;
+ else
+ while Curs.Node /= 0 loop
+ Node := Curs.Node;
+ Delete (C, Curs);
+ Curs := Next (Container, (Node => Node));
+ end loop;
- return C;
+ return C;
+ end if;
end First_To_Previous;
----------