summaryrefslogtreecommitdiff
path: root/gcc/ada/a-cforse.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-24 16:58:19 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2014-02-24 16:58:19 +0000
commit8ac60950725426d4b69f04ebd603e8a83274a1f4 (patch)
tree1add74aa9da3e051e5836c81c36ab340e705ba01 /gcc/ada/a-cforse.adb
parent8033eb4dc2edd1f7c4347e6268cc434d1dc1fc08 (diff)
downloadgcc-8ac60950725426d4b69f04ebd603e8a83274a1f4.tar.gz
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. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@208081 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-cforse.adb')
-rw-r--r--gcc/ada/a-cforse.adb21
1 files changed, 11 insertions, 10 deletions
diff --git a/gcc/ada/a-cforse.adb b/gcc/ada/a-cforse.adb
index ac24420cbbd..bc8ffbaac88 100644
--- a/gcc/ada/a-cforse.adb
+++ b/gcc/ada/a-cforse.adb
@@ -600,7 +600,8 @@ package body Ada.Containers.Formal_Ordered_Sets is
function First_To_Previous
(Container : Set;
- Current : Cursor) return Set is
+ Current : Cursor) return Set
+ is
Curs : Cursor := Current;
C : Set (Container.Capacity) := Copy (Container, Container.Capacity);
Node : Count_Type;
@@ -608,19 +609,19 @@ package body Ada.Containers.Formal_Ordered_Sets 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;
-----------