diff options
author | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-17 10:09:55 +0000 |
---|---|---|
committer | charlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4> | 2009-08-17 10:09:55 +0000 |
commit | e2c9a0153d4c7bde3f380ec853788b7147684da0 (patch) | |
tree | 413a1ca4724e02b6fd1f64e1fe14e1d496bbffa8 /gcc/ada/a-coinve.adb | |
parent | 447e605f4566b27ff6da22c7dca9671073f49508 (diff) | |
download | gcc-e2c9a0153d4c7bde3f380ec853788b7147684da0.tar.gz |
2009-08-17 Robert Dewar <dewar@adacore.com>
* a-caldel-vms.adb, a-calend-vms.adb, a-calfor.adb, a-cdlili.adb,
a-chahan.adb, a-cidlli.adb, a-coinve.adb, a-comlin.adb: Minor code
reorganization (use conditional expressions).
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150834 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-coinve.adb')
-rw-r--r-- | gcc/ada/a-coinve.adb | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/gcc/ada/a-coinve.adb b/gcc/ada/a-coinve.adb index ffa2d1b4e2b..9169e086ebd 100644 --- a/gcc/ada/a-coinve.adb +++ b/gcc/ada/a-coinve.adb @@ -1171,7 +1171,6 @@ package body Ada.Containers.Indefinite_Vectors is and then Index_Type'Last >= 0 then CC := UInt (Index_Type'Last) + UInt (-Index_Type'First) + 1; - else CC := UInt (Int (Index_Type'Last) - First + 1); end if; @@ -1610,7 +1609,6 @@ package body Ada.Containers.Indefinite_Vectors is and then Index_Type'Last >= 0 then CC := UInt (Index_Type'Last) + UInt (-Index_Type'First) + 1; - else CC := UInt (Int (Index_Type'Last) - First + 1); end if; @@ -2283,15 +2281,9 @@ package body Ada.Containers.Indefinite_Vectors is Item : Element_Type; Index : Index_Type := Index_Type'Last) return Extended_Index is - Last : Index_Type'Base; - + Last : constant Index_Type'Base := + (if Index > Container.Last then Container.Last else Index); begin - if Index > Container.Last then - Last := Container.Last; - else - Last := Index; - end if; - for Indx in reverse Index_Type'First .. Last loop if Container.Elements.EA (Indx) /= null and then Container.Elements.EA (Indx).all = Item |