[Gridflow-cvs] [svn] commit: r3479 - /trunk/base/flow_objects.c

gridflow-cvs at artengine.ca gridflow-cvs at artengine.ca
Mon Apr 14 13:14:16 EDT 2008


Author: matju
Date: Mon Apr 14 13:14:15 2008
New Revision: 3479

Log:
remove c++ warnings in [#print]

Modified:
    trunk/base/flow_objects.c

Modified: trunk/base/flow_objects.c
==============================================================================
--- trunk/base/flow_objects.c (original)
+++ trunk/base/flow_objects.c Mon Apr 14 13:14:15 2008
@@ -252,11 +252,10 @@
 		for (int i=0; i<n; i++) {
 			if (base!=2) oprintf(s,f.data(),data[i]);
 			else {
-				T x = data[i];
-				if (x<0) x=-x;
+				T x = gf_abs(data[i]);
 				int ndigits = 1+highest_bit(uint64(x));
-				for (int j=columns-ndigits-(data[i]<0); j>=0; j--) s<<' ';
-				if (data[i]<0) s<<'-';
+				for (int j=columns-ndigits-(data[i]!=x); j>=0; j--) s<<' ';
+				if (data[i]!=x) s<<'-';
 				for (int j=ndigits-1; j>=0; j--) {
 					s<<char('0'+(((long)x>>j)&1));
 				}



More information about the Gridflow-cvs mailing list