aboutsummaryrefslogtreecommitdiff
path: root/src/formatter.cpp
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2011-01-20 18:09:04 +0000
committerMike Buland <eichlan@xagasoft.com>2011-01-20 18:09:04 +0000
commit393f1b414746a7f1977971dd7659dd2b47092b11 (patch)
tree81d0ca1ee70ab86a7d79c1991abe5c387b655fb2 /src/formatter.cpp
parentc259f95bd0e58b247940a339bb9b4b401b4e9438 (diff)
parent7e25a863325dc3e9762397e700030969e093b087 (diff)
downloadlibbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.gz
libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.bz2
libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.tar.xz
libbu++-393f1b414746a7f1977971dd7659dd2b47092b11.zip
Wow! Merged the branch, streams are updated, and there's no more FString, run
the fixstrings.sh script in the support directory to (hopefully) automatically update your projects.
Diffstat (limited to '')
-rw-r--r--src/formatter.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/formatter.cpp b/src/formatter.cpp
index 7eaa1e2..f73d46e 100644
--- a/src/formatter.cpp
+++ b/src/formatter.cpp
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (C) 2007-2010 Xagasoft, All rights reserved. 2 * Copyright (C) 2007-2011 Xagasoft, All rights reserved.
3 * 3 *
4 * This file is part of the libbu++ library and is released under the 4 * This file is part of the libbu++ library and is released under the
5 * terms of the license contained in the file LICENSE. 5 * terms of the license contained in the file LICENSE.
@@ -21,7 +21,7 @@ Bu::Formatter::~Formatter()
21{ 21{
22} 22}
23 23
24void Bu::Formatter::write( const Bu::FString &sStr ) 24void Bu::Formatter::write( const Bu::String &sStr )
25{ 25{
26 rStream.write( sStr ); 26 rStream.write( sStr );
27} 27}
@@ -31,7 +31,7 @@ void Bu::Formatter::write( const void *sStr, int iLen )
31 rStream.write( sStr, iLen ); 31 rStream.write( sStr, iLen );
32} 32}
33 33
34void Bu::Formatter::writeAligned( const Bu::FString &sStr ) 34void Bu::Formatter::writeAligned( const Bu::String &sStr )
35{ 35{
36 int iLen = sStr.getSize(); 36 int iLen = sStr.getSize();
37 if( iLen > fLast.uMinWidth ) 37 if( iLen > fLast.uMinWidth )
@@ -117,9 +117,9 @@ void Bu::Formatter::read( void *sStr, int iLen )
117 rStream.read( sStr, iLen ); 117 rStream.read( sStr, iLen );
118} 118}
119 119
120Bu::FString Bu::Formatter::readToken() 120Bu::String Bu::Formatter::readToken()
121{ 121{
122 Bu::FString sRet; 122 Bu::String sRet;
123 if( fLast.bTokenize ) 123 if( fLast.bTokenize )
124 { 124 {
125 for(;;) 125 for(;;)
@@ -292,7 +292,7 @@ Bu::Formatter &Bu::operator<<( Bu::Formatter &f, char *sStr )
292 return f; 292 return f;
293} 293}
294 294
295Bu::Formatter &Bu::operator<<( Bu::Formatter &f, const Bu::FString &sStr ) 295Bu::Formatter &Bu::operator<<( Bu::Formatter &f, const Bu::String &sStr )
296{ 296{
297 f.writeAligned( sStr ); 297 f.writeAligned( sStr );
298 return f; 298 return f;
@@ -388,7 +388,7 @@ Bu::Formatter &Bu::operator<<( Bu::Formatter &f, bool b )
388 return f; 388 return f;
389} 389}
390 390
391Bu::Formatter &Bu::operator>>( Bu::Formatter &f, Bu::FString &sStr ) 391Bu::Formatter &Bu::operator>>( Bu::Formatter &f, Bu::String &sStr )
392{ 392{
393 sStr = f.readToken(); 393 sStr = f.readToken();
394 return f; 394 return f;
@@ -480,7 +480,7 @@ Bu::Formatter &Bu::operator>>( Bu::Formatter &f, long double &flt )
480 480
481Bu::Formatter &Bu::operator>>( Bu::Formatter &f, bool &b ) 481Bu::Formatter &Bu::operator>>( Bu::Formatter &f, bool &b )
482{ 482{
483 Bu::FString sStr = f.readToken(); 483 Bu::String sStr = f.readToken();
484 if( !sStr.isSet() ) 484 if( !sStr.isSet() )
485 return f; 485 return f;
486 char c = *sStr.begin(); 486 char c = *sStr.begin();