summaryrefslogtreecommitdiff
path: root/src/formatter.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-10-27 04:44:46 +0000
committerMike Buland <eichlan@xagasoft.com>2011-10-27 04:44:46 +0000
commit9906ffe3c54875133448134c09ec12a0949d48cd (patch)
tree0542fef3d27e796700b87b44394a3ad31dd5b852 /src/formatter.h
parent411f240da34bab53cd18aa8b7ba09834ede49b1c (diff)
parent029b5d159023f4dad607359dbfaa2479e21fe9e5 (diff)
downloadlibbu++-9906ffe3c54875133448134c09ec12a0949d48cd.tar.gz
libbu++-9906ffe3c54875133448134c09ec12a0949d48cd.tar.bz2
libbu++-9906ffe3c54875133448134c09ec12a0949d48cd.tar.xz
libbu++-9906ffe3c54875133448134c09ec12a0949d48cd.zip
Reorg'd! I merged in the release-fixup branch and fixed all random warnings.
I also cleaned up the build script, the symlink generation is faster and looks nicer, there's one think left to fix there, but it's not too bad.
Diffstat (limited to 'src/formatter.h')
-rw-r--r--src/formatter.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/formatter.h b/src/formatter.h
index 5840323..80a55ab 100644
--- a/src/formatter.h
+++ b/src/formatter.h
@@ -135,7 +135,6 @@ namespace Bu
135 void ffmt( type f ) 135 void ffmt( type f )
136 { 136 {
137 Bu::String fTmp; 137 Bu::String fTmp;
138 bool bNeg = false;
139 char cBase = fLast.bCaps?'A':'a'; 138 char cBase = fLast.bCaps?'A':'a';
140 if( fLast.uRadix < 2 || fLast.uRadix > 36 ) 139 if( fLast.uRadix < 2 || fLast.uRadix > 36 )
141 { 140 {
@@ -145,7 +144,6 @@ namespace Bu
145 144
146 if( signbit(f) ) 145 if( signbit(f) )
147 { 146 {
148 bNeg = true;
149 f = -f; 147 f = -f;
150 fTmp += "-"; 148 fTmp += "-";
151 } 149 }
@@ -228,7 +226,9 @@ namespace Bu
228 template<typename type> 226 template<typename type>
229 void fparse( type &f, const Bu::String &sBuf ) 227 void fparse( type &f, const Bu::String &sBuf )
230 { 228 {
231 sscanf( sBuf.getStr(), "%f", &f ); 229 double fIn;
230 sscanf( sBuf.getStr(), "%lf", &fIn );
231 f = fIn;
232 usedFormat(); 232 usedFormat();
233 } 233 }
234 234