From bbc76396d899e6b59ce17643095c8d48f7083662 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Tue, 24 Feb 2009 02:32:55 +0000 Subject: Corrected some iterator confusion in FString and added a helper to ProtocolTelnet. I'm going to have to do some reading and find out just where ProtocolTelnet is... --- src/fbasicstring.h | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'src/fbasicstring.h') diff --git a/src/fbasicstring.h b/src/fbasicstring.h index 8303b5a..8bbbe91 100644 --- a/src/fbasicstring.h +++ b/src/fbasicstring.h @@ -150,6 +150,12 @@ namespace Bu { } + const_iterator() : + pChunk( NULL ), + iPos( 0 ) + { + } + bool operator==( const const_iterator &i ) const { return pChunk == i.pChunk && iPos == i.iPos; @@ -365,6 +371,12 @@ namespace Bu { } + iterator() : + pChunk( NULL ), + iPos( 0 ) + { + } + operator const_iterator() const { return const_iterator( pChunk, iPos ); @@ -1383,7 +1395,7 @@ namespace Bu } const_iterator find( const chr cChar, - const_iterator iStart=begin() ) const + const_iterator iStart=typename MyType::const_iterator() ) const { for( ; iStart; iStart++ ) { @@ -1394,7 +1406,7 @@ namespace Bu } const_iterator find( const chr *sText, int nLen, - const_iterator iStart=begin() ) const + const_iterator iStart=typename MyType::const_iterator() ) const { for( ; iStart; iStart++ ) { @@ -1405,7 +1417,7 @@ namespace Bu } const_iterator find( const MyType &rStr, - const_iterator iStart=begin() ) const + const_iterator iStart=typename MyType::const_iterator() ) const { for( ; iStart; iStart++ ) { @@ -1416,7 +1428,7 @@ namespace Bu } const_iterator find( const MyType &rStr, int nLen, - const_iterator iStart=begin() ) const + const_iterator iStart=typename MyType::const_iterator() ) const { for( ; iStart; iStart++ ) { -- cgit v1.2.3