diff options
author | Mike Buland <eichlan@xagasoft.com> | 2008-12-29 21:33:08 +0000 |
---|---|---|
committer | Mike Buland <eichlan@xagasoft.com> | 2008-12-29 21:33:08 +0000 |
commit | f461b3c1839e5cfc85685ed1cb828ecaa74d6912 (patch) | |
tree | 5b04dabaea17632ba7c8ab448c9472ecfdaf765e /src/tafwriter.cpp | |
parent | fc9da0992217c7d593ad97d2f338850b40cbaaec (diff) | |
download | libbu++-f461b3c1839e5cfc85685ed1cb828ecaa74d6912.tar.gz libbu++-f461b3c1839e5cfc85685ed1cb828ecaa74d6912.tar.bz2 libbu++-f461b3c1839e5cfc85685ed1cb828ecaa74d6912.tar.xz libbu++-f461b3c1839e5cfc85685ed1cb828ecaa74d6912.zip |
Fixed some horror inside the Taf writer. It had a strange corner case when
adding a property to a group that had a name but an empty value.
Also added a isEmpty() function to Bu::FString, finally.
Diffstat (limited to 'src/tafwriter.cpp')
-rw-r--r-- | src/tafwriter.cpp | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/tafwriter.cpp b/src/tafwriter.cpp index 8e5fcdc..b0f5def 100644 --- a/src/tafwriter.cpp +++ b/src/tafwriter.cpp | |||
@@ -58,7 +58,7 @@ void Bu::TafWriter::writeGroup( const Bu::TafGroup *pRoot ) | |||
58 | void Bu::TafWriter::writeProperty( const Bu::TafProperty *pProp ) | 58 | void Bu::TafWriter::writeProperty( const Bu::TafProperty *pProp ) |
59 | { | 59 | { |
60 | ident(); | 60 | ident(); |
61 | if( pProp->getName().getStr() != NULL && pProp->getName() != "" ) | 61 | if( !pProp->getName().isEmpty() ) |
62 | { | 62 | { |
63 | writeString( pProp->getName() ); | 63 | writeString( pProp->getName() ); |
64 | sOut.write("=", 1 ); | 64 | sOut.write("=", 1 ); |
@@ -90,8 +90,6 @@ void Bu::TafWriter::writeComment( const Bu::TafComment *pComment ) | |||
90 | 90 | ||
91 | void Bu::TafWriter::writeString( const Bu::FString &str ) | 91 | void Bu::TafWriter::writeString( const Bu::FString &str ) |
92 | { | 92 | { |
93 | if( str.getStr() == NULL ) | ||
94 | return; | ||
95 | sOut.write("\"", 1 ); | 93 | sOut.write("\"", 1 ); |
96 | for( Bu::FString::const_iterator s = str.begin(); s != str.end(); s++ ) | 94 | for( Bu::FString::const_iterator s = str.begin(); s != str.end(); s++ ) |
97 | { | 95 | { |