aboutsummaryrefslogtreecommitdiff
path: root/src/formatter.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-07-17 21:59:43 +0000
committerMike Buland <eichlan@xagasoft.com>2011-07-17 21:59:43 +0000
commit0ac83365291af6260a45730bd24a0c0d98d9d8fd (patch)
tree6ad8b9bf67fc7e8953aecdd313714cf7fae35c59 /src/formatter.cpp
parent0bc7562c218376b44a3eb87db0e310df0b1d0036 (diff)
downloadlibbu++-0ac83365291af6260a45730bd24a0c0d98d9d8fd.tar.gz
libbu++-0ac83365291af6260a45730bd24a0c0d98d9d8fd.tar.bz2
libbu++-0ac83365291af6260a45730bd24a0c0d98d9d8fd.tar.xz
libbu++-0ac83365291af6260a45730bd24a0c0d98d9d8fd.zip
More variant unit tests, signed and unsigned chars are no formatted as numbers,
while chars are formatted as characters.
Diffstat (limited to 'src/formatter.cpp')
-rw-r--r--src/formatter.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/formatter.cpp b/src/formatter.cpp
index 17fb311..61a059a 100644
--- a/src/formatter.cpp
+++ b/src/formatter.cpp
@@ -351,7 +351,8 @@ Bu::Formatter &Bu::operator<<( Bu::Formatter &f, const Bu::String &sStr )
351 351
352Bu::Formatter &Bu::operator<<( Bu::Formatter &f, signed char c ) 352Bu::Formatter &Bu::operator<<( Bu::Formatter &f, signed char c )
353{ 353{
354 f.write( (char *)&c, 1 ); 354 f.ifmt<signed char>( c );
355 //f.write( (char *)&c, 1 );
355 return f; 356 return f;
356} 357}
357 358
@@ -363,7 +364,8 @@ Bu::Formatter &Bu::operator<<( Bu::Formatter &f, char c )
363 364
364Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned char c ) 365Bu::Formatter &Bu::operator<<( Bu::Formatter &f, unsigned char c )
365{ 366{
366 f.write( (char *)&c, 1 ); 367 f.ifmt<unsigned char>( c );
368 //f.write( (char *)&c, 1 );
367 return f; 369 return f;
368} 370}
369 371