diff options
author | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-02-24 17:58:19 +0100 |
---|---|---|
committer | Arnaud Charlet <charlet@gcc.gnu.org> | 2014-02-24 17:58:19 +0100 |
commit | 1b31321b1834aac1bd455e5a457145827dee562f (patch) | |
tree | 1add74aa9da3e051e5836c81c36ab340e705ba01 /gcc/ada/a-cforma.adb | |
parent | 2810861847cca82646c1c7e14249fe198acbbc0f (diff) | |
download | gcc-1b31321b1834aac1bd455e5a457145827dee562f.tar.gz |
[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-cforma.adb')
-rw-r--r-- | gcc/ada/a-cforma.adb | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/gcc/ada/a-cforma.adb b/gcc/ada/a-cforma.adb index f8aadf5bbf0..69f2cc7b6d7 100644 --- a/gcc/ada/a-cforma.adb +++ b/gcc/ada/a-cforma.adb @@ -336,18 +336,18 @@ package body Ada.Containers.Formal_Ordered_Maps is 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; ------------ @@ -524,7 +524,8 @@ package body Ada.Containers.Formal_Ordered_Maps is function First_To_Previous (Container : Map; - Current : Cursor) return Map is + Current : Cursor) return Map + is Curs : Cursor := Current; C : Map (Container.Capacity) := Copy (Container, Container.Capacity); Node : Count_Type; @@ -532,19 +533,19 @@ package body Ada.Containers.Formal_Ordered_Maps is begin 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; ----------- |