summaryrefslogtreecommitdiff
path: root/gcc/ada/s-wwdcha.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2008-08-22 17:46:29 +0200
committerArnaud Charlet <charlet@gcc.gnu.org>2008-08-22 17:46:29 +0200
commit5b2da9482870c6e5d1fc8ad90c9801647ad28171 (patch)
treebd40196e93ca7d7b2a69389438d20cf46c49f43b /gcc/ada/s-wwdcha.adb
parentf5e811d59797b6b3e56e69bd48331e1bc15af6ed (diff)
downloadgcc-5b2da9482870c6e5d1fc8ad90c9801647ad28171.tar.gz
s-wwdcha.adb: Minor code reorganization Remove dead code
2008-08-22 Robert Dewar <dewar@adacore.com> * s-wwdcha.adb: Minor code reorganization Remove dead code From-SVN: r139490
Diffstat (limited to 'gcc/ada/s-wwdcha.adb')
-rw-r--r--gcc/ada/s-wwdcha.adb41
1 files changed, 11 insertions, 30 deletions
diff --git a/gcc/ada/s-wwdcha.adb b/gcc/ada/s-wwdcha.adb
index 3580a0142f5..6f2d1ceedd2 100644
--- a/gcc/ada/s-wwdcha.adb
+++ b/gcc/ada/s-wwdcha.adb
@@ -6,7 +6,7 @@
-- --
-- B o d y --
-- --
--- Copyright (C) 1992-2005, Free Software Foundation, Inc. --
+-- Copyright (C) 1992-2008, Free Software Foundation, Inc. --
-- --
-- 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- --
@@ -43,20 +43,11 @@ package body System.WWd_Char is
begin
W := 0;
for C in Lo .. Hi loop
- -- For Character range, use length of image
-
- if Character'Pos (C) < 256 then
- declare
- S : constant Wide_String := Character'Wide_Image (C);
- begin
- W := Natural'Max (W, S'Length);
- end;
-
- -- For wide character, always max out at 12 (Hex_hhhhhhhh)
-
- else
- return 12;
- end if;
+ declare
+ S : constant Wide_String := Character'Wide_Image (C);
+ begin
+ W := Natural'Max (W, S'Length);
+ end;
end loop;
return W;
@@ -72,21 +63,11 @@ package body System.WWd_Char is
begin
W := 0;
for C in Lo .. Hi loop
-
- -- For Character range, use length of image
-
- if Character'Pos (C) < 256 then
- declare
- S : constant String := Character'Image (C);
- begin
- W := Natural'Max (W, S'Length);
- end;
-
- -- For wide character, always max out at 12 (Hex_hhhhhhhh)
-
- else
- return 12;
- end if;
+ declare
+ S : constant String := Character'Image (C);
+ begin
+ W := Natural'Max (W, S'Length);
+ end;
end loop;
return W;