diff options
Diffstat (limited to 'src/fstring.h')
| -rw-r--r-- | src/fstring.h | 15 |
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 | { |
