aboutsummaryrefslogtreecommitdiff
path: root/src/fstring.h
diff options
context:
space:
mode:
authorMike Buland <eichlan@xagasoft.com>2008-12-29 21:33:08 +0000
committerMike Buland <eichlan@xagasoft.com>2008-12-29 21:33:08 +0000
commitf461b3c1839e5cfc85685ed1cb828ecaa74d6912 (patch)
tree5b04dabaea17632ba7c8ab448c9472ecfdaf765e /src/fstring.h
parentfc9da0992217c7d593ad97d2f338850b40cbaaec (diff)
downloadlibbu++-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/fstring.h')
-rw-r--r--src/fstring.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/fstring.h b/src/fstring.h
index 5c70919..e1660f9 100644
--- a/src/fstring.h
+++ b/src/fstring.h
@@ -928,26 +928,41 @@ namespace Bu
928 928
929 iterator begin() 929 iterator begin()
930 { 930 {
931 if( nLength == 0 )
932 return NULL;
931 flatten(); 933 flatten();
932 return pFirst->pData; 934 return pFirst->pData;
933 } 935 }
934 936
935 const_iterator begin() const 937 const_iterator begin() const
936 { 938 {
939 if( nLength == 0 )
940 return NULL;
937 flatten(); 941 flatten();
938 return pFirst->pData; 942 return pFirst->pData;
939 } 943 }
940 944
941 iterator end() 945 iterator end()
942 { 946 {
947 if( nLength == 0 )
948 return NULL;
943 return pFirst->pData+pFirst->nLength; 949 return pFirst->pData+pFirst->nLength;
944 } 950 }
945 951
946 const_iterator end() const 952 const_iterator end() const
947 { 953 {
954 if( nLength == 0 )
955 return NULL;
948 return pFirst->pData+pFirst->nLength; 956 return pFirst->pData+pFirst->nLength;
949 } 957 }
950 958
959 bool isEmpty() const
960 {
961 if( nLength == 0 )
962 return true;
963 return false;
964 }
965
951 private: 966 private:
952 void flatten() const 967 void flatten() const
953 { 968 {