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).
+ * a-crbtgk.adb, a-crdlli.adb, a-direct.adb, 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).
2009-08-17 Robert Dewar <dewar@adacore.com>
while X /= null loop
Y := X;
Inserted := Is_Less_Key_Node (Key, X);
-
- if Inserted then
- X := Ops.Left (X);
- else
- X := Ops.Right (X);
- end if;
+ X := (if Inserted then Ops.Left (X) else Ops.Right (X));
end loop;
-- If Inserted is True, then this means either that Tree is
while X /= null loop
Y := X;
Before := Is_Less_Key_Node (Key, X);
-
- if Before then
- X := Ops.Left (X);
- else
- X := Ops.Right (X);
- end if;
+ X := (if Before then Ops.Left (X) else Ops.Right (X));
end loop;
Insert_Post (Tree, Y, Before, Node);
----------
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);
Cut_End : Natural;
begin
- -- Cut_Start point to the first simple name character
+ -- Cut_Start pointS to the first simple name character
- if Cut_Start = 0 then
- Cut_Start := Path'First;
-
- else
- Cut_Start := Cut_Start + 1;
- end if;
+ Cut_Start := (if Cut_Start = 0 then Path'First else Cut_Start + 1);
-- Cut_End point to the last simple name character