From 80672213c63260d1016c0673c6e1e8e07524322b Mon Sep 17 00:00:00 2001 From: Kenneth Russel Date: Fri, 29 Aug 2008 19:03:52 +0000 Subject: 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 --- src/java/com/sun/gluegen/JavaEmitter.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src') 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 + ";"); } } -- cgit v1.2.3