diff options
author | Kenneth Russel <[email protected]> | 2008-08-29 19:03:52 +0000 |
---|---|---|
committer | Kenneth Russel <[email protected]> | 2008-08-29 19:03:52 +0000 |
commit | 80672213c63260d1016c0673c6e1e8e07524322b (patch) | |
tree | 0b2346242f28384c2df0089dfa71bae66d404f35 | |
parent | b000a15b12b0e2eadd567ef6e2ac98edf246f485 (diff) |
Fixed bug in printing of floating point constants that already end with "f"
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/branches/JOGL_2_SANDBOX@113 a78bb65f-1512-4460-ba86-f6dc96a7bf27
-rw-r--r-- | src/java/com/sun/gluegen/JavaEmitter.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/java/com/sun/gluegen/JavaEmitter.java b/src/java/com/sun/gluegen/JavaEmitter.java index 60daf89..2588158 100644 --- a/src/java/com/sun/gluegen/JavaEmitter.java +++ b/src/java/com/sun/gluegen/JavaEmitter.java @@ -281,7 +281,10 @@ public class JavaEmitter implements GlueEmitter { if (optionalComment != null && optionalComment.length() != 0) { javaWriter().println(" /** " + optionalComment + " */"); } - String suffix = (type.equals("float") ? "f" : ""); + String suffix = ""; + if (type.equals("float") && !value.endsWith("f")) { + suffix = "f"; + } javaWriter().println(" public static final " + type + " " + name + " = " + value + suffix + ";"); } } |