From 8d1e3745fc7dcd77f68e7e3841209bb73e284aa6 Mon Sep 17 00:00:00 2001 From: charlet Date: Mon, 30 Nov 2009 10:28:23 +0000 Subject: 2009-11-30 Sergey Rybin * gnat_ugn.texi: Update gnatcheck doc. 2009-11-30 Robert Dewar make.adb, prj-makr.adb, g-sothco.ads: Minor reformattting * s-taprop-dummy.adb: Minor code reorganization (raise with msgs start with lower case). * i-vxwoio.adb, g-dirope.adb, g-sercom-linux.adb, g-enblsp-vms-alpha.adb, g-regist.adb, s-imgcha.adb, s-tarest.adb, s-taprop-mingw.adb, g-exctra.adb, g-expect.adb, g-comlin.adb, g-debpoo.adb, g-expect-vms.adb, g-pehage.adb, g-trasym-vms-alpha.adb, g-enblsp-vms-ia64.adb, s-fatgen.adb, s-fileio.adb: Minor code reorganization (use conditional expressions). git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@154773 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/g-comlin.adb | 23 ++++++++--------------- 1 file changed, 8 insertions(+), 15 deletions(-) (limited to 'gcc/ada/g-comlin.adb') diff --git a/gcc/ada/g-comlin.adb b/gcc/ada/g-comlin.adb index e655cad763d..eb982543b38 100644 --- a/gcc/ada/g-comlin.adb +++ b/gcc/ada/g-comlin.adb @@ -574,11 +574,8 @@ package body GNAT.Command_Line is -- Depending on the value of Concatenate, the full switch is -- a single character or the rest of the argument. - if Concatenate then - End_Index := Parser.Current_Index; - else - End_Index := Arg'Last; - end if; + End_Index := + (if Concatenate then Parser.Current_Index else Arg'Last); if Switches (Switches'First) = '*' then @@ -2279,20 +2276,16 @@ package body GNAT.Command_Line is Cmd.Coalesce_Sections := new Argument_List (Cmd.Sections'Range); for E in Cmd.Sections'Range loop - if Cmd.Sections (E) = null then - Cmd.Coalesce_Sections (E) := null; - else - Cmd.Coalesce_Sections (E) := new String'(Cmd.Sections (E).all); - end if; + Cmd.Coalesce_Sections (E) := + (if Cmd.Sections (E) = null then null + else new String'(Cmd.Sections (E).all)); end loop; Cmd.Coalesce_Params := new Argument_List (Cmd.Params'Range); for E in Cmd.Params'Range loop - if Cmd.Params (E) = null then - Cmd.Coalesce_Params (E) := null; - else - Cmd.Coalesce_Params (E) := new String'(Cmd.Params (E).all); - end if; + Cmd.Coalesce_Params (E) := + (if Cmd.Params (E) = null then null + else new String'(Cmd.Params (E).all)); end loop; -- Not a clone, since we will not modify the parameters anyway -- cgit v1.2.1