From 96e6c35ec13aa4982a90d78a24617cf5110842da Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 20 May 2010 21:31:11 +0000 Subject: Added some tweaks to array and fbasicstring. --- src/array.h | 4 +++- 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 core->clear(); } - void append( const value &rVal ) + MyType &append( const value &rVal ) { _hardCopy(); if( core->iSize == core->iCapacity ) @@ -181,6 +181,8 @@ namespace Bu } core->va.construct( &core->pData[core->iSize++], rVal ); + + return *this; } //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 for( ; core->pFirst->nLength > 0 && core->pFirst->pData[core->pFirst->nLength-1] == c; core->pFirst->nLength--, core->nLength-- ) { } } - void format( const char *sFrmt, ...) + MyType &format( const char *sFrmt, ...) { _hardCopy(); clear(); @@ -1943,9 +1943,11 @@ namespace Bu core->appendChunk( pNew ); va_end( ap ); + + return *this; } - void formatAppend( const char *sFrmt, ...) + MyType &formatAppend( const char *sFrmt, ...) { _hardCopy(); va_list ap; @@ -1958,9 +1960,11 @@ namespace Bu core->appendChunk( pNew ); va_end( ap ); + + return *this; } - void formatPrepend( const char *sFrmt, ...) + MyType &formatPrepend( const char *sFrmt, ...) { _hardCopy(); va_list ap; @@ -1973,6 +1977,8 @@ namespace Bu core->prependChunk( pNew ); va_end( ap ); + + return *this; } iterator begin() -- cgit v1.2.3