diff options
Diffstat (limited to 'gcc/ada/g-pehage.adb')
-rw-r--r-- | gcc/ada/g-pehage.adb | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/gcc/ada/g-pehage.adb b/gcc/ada/g-pehage.adb index 5abb04c2138..e96b9cc0c58 100644 --- a/gcc/ada/g-pehage.adb +++ b/gcc/ada/g-pehage.adb @@ -6,7 +6,7 @@ -- -- -- B o d y -- -- -- --- Copyright (C) 2002-2008, AdaCore -- +-- Copyright (C) 2002-2009, AdaCore -- -- -- -- GNAT is free software; you can redistribute it and/or modify it under -- -- terms of the GNU General Public License as published by the Free Soft- -- @@ -1970,11 +1970,7 @@ package body GNAT.Perfect_Hash_Generators is Q := Seed / 127773; X := 16807 * R - 2836 * Q; - if X < 0 then - Seed := X + 2147483647; - else - Seed := X; - end if; + Seed := (if X < 0 then X + 2147483647 else X); end Random; ------------- @@ -2233,11 +2229,8 @@ package body GNAT.Perfect_Hash_Generators is -- The first position should not exceed the minimum key length. -- Otherwise, we may end up with an empty word once reduced. - if Last_Sel_Pos = 0 then - Max_Sel_Pos := Min_Key_Len; - else - Max_Sel_Pos := Max_Key_Len; - end if; + Max_Sel_Pos := + (if Last_Sel_Pos = 0 then Min_Key_Len else Max_Key_Len); -- Find which position increases more the number of differences |