summaryrefslogtreecommitdiff
path: root/gcc/ada/a-crdlli.adb
diff options
context:
space:
mode:
authorcharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-17 10:30:39 +0000
committercharlet <charlet@138bc75d-0d04-0410-961f-82ee72b054a4>2009-08-17 10:30:39 +0000
commitcdaf90c45ab90ad379b6120042af5eff44e16948 (patch)
tree7a21d420ca26189894adc6664109661232cf267e /gcc/ada/a-crdlli.adb
parent85f0a28a821080d21907010eaf82154b4d925395 (diff)
downloadgcc-cdaf90c45ab90ad379b6120042af5eff44e16948.tar.gz
2009-08-17 Robert Dewar <dewar@adacore.com>
* a-crbtgk.adb, a-crdlli.adb, a-direct.adb: Minor code reorganization (use conditional expressions) git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@150837 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/ada/a-crdlli.adb')
-rw-r--r--gcc/ada/a-crdlli.adb10
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/ada/a-crdlli.adb b/gcc/ada/a-crdlli.adb
index acdc57d1a08..137290b11e0 100644
--- a/gcc/ada/a-crdlli.adb
+++ b/gcc/ada/a-crdlli.adb
@@ -561,15 +561,9 @@ package body Ada.Containers.Restricted_Doubly_Linked_Lists is
----------
procedure Sort (Front, Back : Count_Type) is
- Pivot : Count_Type;
-
+ Pivot : constant Count_Type :=
+ (if Front = 0 then Container.First else N (Front).Next);
begin
- if Front = 0 then
- Pivot := Container.First;
- else
- Pivot := N (Front).Next;
- end if;
-
if Pivot /= Back then
Partition (Pivot, Back);
Sort (Front, Pivot);