diff options
| author | Mike Buland <eichlan@xagasoft.com> | 2010-05-20 21:31:11 +0000 |
|---|---|---|
| committer | Mike Buland <eichlan@xagasoft.com> | 2010-05-20 21:31:11 +0000 |
| commit | 96e6c35ec13aa4982a90d78a24617cf5110842da (patch) | |
| tree | 526bb491fa688bd638ab41d5840081ba885f527c /src | |
| parent | da38bfc4ed4d6714a5d9f1b42e002fe8221ae268 (diff) | |
| download | libbu++-96e6c35ec13aa4982a90d78a24617cf5110842da.tar.gz libbu++-96e6c35ec13aa4982a90d78a24617cf5110842da.tar.bz2 libbu++-96e6c35ec13aa4982a90d78a24617cf5110842da.tar.xz libbu++-96e6c35ec13aa4982a90d78a24617cf5110842da.zip | |
Added some tweaks to array and fbasicstring.
Diffstat (limited to '')
| -rw-r--r-- | src/array.h | 4 | ||||
| -rw-r--r-- | src/fbasicstring.h | 12 |
2 files changed, 12 insertions, 4 deletions
diff --git a/src/array.h b/src/array.h index 029bc26..604f8a6 100644 --- a/src/array.h +++ b/src/array.h | |||
| @@ -172,7 +172,7 @@ namespace Bu | |||
| 172 | core->clear(); | 172 | core->clear(); |
| 173 | } | 173 | } |
| 174 | 174 | ||
| 175 | void append( const value &rVal ) | 175 | MyType &append( const value &rVal ) |
| 176 | { | 176 | { |
| 177 | _hardCopy(); | 177 | _hardCopy(); |
| 178 | if( core->iSize == core->iCapacity ) | 178 | if( core->iSize == core->iCapacity ) |
| @@ -181,6 +181,8 @@ namespace Bu | |||
| 181 | } | 181 | } |
| 182 | 182 | ||
| 183 | core->va.construct( &core->pData[core->iSize++], rVal ); | 183 | core->va.construct( &core->pData[core->iSize++], rVal ); |
| 184 | |||
| 185 | return *this; | ||
| 184 | } | 186 | } |
| 185 | 187 | ||
| 186 | //operator | 188 | //operator |
diff --git a/src/fbasicstring.h b/src/fbasicstring.h index 51e36f8..670873e 100644 --- a/src/fbasicstring.h +++ b/src/fbasicstring.h | |||
| @@ -1928,7 +1928,7 @@ namespace Bu | |||
| 1928 | for( ; core->pFirst->nLength > 0 && core->pFirst->pData[core->pFirst->nLength-1] == c; core->pFirst->nLength--, core->nLength-- ) { } | 1928 | for( ; core->pFirst->nLength > 0 && core->pFirst->pData[core->pFirst->nLength-1] == c; core->pFirst->nLength--, core->nLength-- ) { } |
| 1929 | } | 1929 | } |
| 1930 | 1930 | ||
| 1931 | void format( const char *sFrmt, ...) | 1931 | MyType &format( const char *sFrmt, ...) |
| 1932 | { | 1932 | { |
| 1933 | _hardCopy(); | 1933 | _hardCopy(); |
| 1934 | clear(); | 1934 | clear(); |
| @@ -1943,9 +1943,11 @@ namespace Bu | |||
| 1943 | core->appendChunk( pNew ); | 1943 | core->appendChunk( pNew ); |
| 1944 | 1944 | ||
| 1945 | va_end( ap ); | 1945 | va_end( ap ); |
| 1946 | |||
| 1947 | return *this; | ||
| 1946 | } | 1948 | } |
| 1947 | 1949 | ||
| 1948 | void formatAppend( const char *sFrmt, ...) | 1950 | MyType &formatAppend( const char *sFrmt, ...) |
| 1949 | { | 1951 | { |
| 1950 | _hardCopy(); | 1952 | _hardCopy(); |
| 1951 | va_list ap; | 1953 | va_list ap; |
| @@ -1958,9 +1960,11 @@ namespace Bu | |||
| 1958 | core->appendChunk( pNew ); | 1960 | core->appendChunk( pNew ); |
| 1959 | 1961 | ||
| 1960 | va_end( ap ); | 1962 | va_end( ap ); |
| 1963 | |||
| 1964 | return *this; | ||
| 1961 | } | 1965 | } |
| 1962 | 1966 | ||
| 1963 | void formatPrepend( const char *sFrmt, ...) | 1967 | MyType &formatPrepend( const char *sFrmt, ...) |
| 1964 | { | 1968 | { |
| 1965 | _hardCopy(); | 1969 | _hardCopy(); |
| 1966 | va_list ap; | 1970 | va_list ap; |
| @@ -1973,6 +1977,8 @@ namespace Bu | |||
| 1973 | core->prependChunk( pNew ); | 1977 | core->prependChunk( pNew ); |
| 1974 | 1978 | ||
| 1975 | va_end( ap ); | 1979 | va_end( ap ); |
| 1980 | |||
| 1981 | return *this; | ||
| 1976 | } | 1982 | } |
| 1977 | 1983 | ||
| 1978 | iterator begin() | 1984 | iterator begin() |
