diff options
author | Mike Buland <eichlan@xagasoft.com> | 2015-08-24 01:33:55 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2015-08-24 01:33:55 +0000 |
commit | 8c618fdda44e8ed4377476b58ec10fd2f73869ec (patch) | |
tree | 299d9fccebbcf686400b928f2e60cb6f0d30ae37 /src/stable/formatter.cpp | |
parent | 61165ba36ee0cbada8a97d075bdaaf13cb5c5a4a (diff) | |
download | libbu++-8c618fdda44e8ed4377476b58ec10fd2f73869ec.tar.gz libbu++-8c618fdda44e8ed4377476b58ec10fd2f73869ec.tar.bz2 libbu++-8c618fdda44e8ed4377476b58ec10fd2f73869ec.tar.xz libbu++-8c618fdda44e8ed4377476b58ec10fd2f73869ec.zip |
Minor stability/speed improvements, don't try to write null strings to a stream.
Diffstat (limited to 'src/stable/formatter.cpp')
-rw-r--r-- | src/stable/formatter.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/stable/formatter.cpp b/src/stable/formatter.cpp index a757921..f8da5a1 100644 --- a/src/stable/formatter.cpp +++ b/src/stable/formatter.cpp | |||
@@ -80,6 +80,8 @@ void Bu::Formatter::write( const void *sStr, int iLen ) | |||
80 | void Bu::Formatter::writeAligned( const Bu::String &sStr ) | 80 | void Bu::Formatter::writeAligned( const Bu::String &sStr ) |
81 | { | 81 | { |
82 | int iLen = sStr.getSize(); | 82 | int iLen = sStr.getSize(); |
83 | if( iLen == 0 ) | ||
84 | return; | ||
83 | if( iLen > fLast.uMinWidth ) | 85 | if( iLen > fLast.uMinWidth ) |
84 | { | 86 | { |
85 | write( sStr ); | 87 | write( sStr ); |