From 7ddeaa42e452a85e275649efa519fe0959210d12 Mon Sep 17 00:00:00 2001 From: Mike Buland Date: Thu, 11 Sep 2008 21:09:31 +0000 Subject: Fixed some whacky old FBasicString hikinx. Basically it supports all the basic, expected operators now, like plus. It was annoying without them. --- src/fstring.h | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/fstring.h') diff --git a/src/fstring.h b/src/fstring.h index fb4bf55..93216a1 100644 --- a/src/fstring.h +++ b/src/fstring.h @@ -492,6 +492,20 @@ namespace Bu return (*this); } + MyType operator +( const MyType &rRight ) + { + MyType ret( *this ); + ret.append( rRight ); + return ret; + } + + MyType operator +( const chr *pRight ) + { + MyType ret( *this ); + ret.append( pRight ); + return ret; + } + /** * Reset your FString to this character array. *@param pData (const chr *) The character array to set your FString to. @@ -1032,6 +1046,12 @@ namespace Bu template<> uint32_t __calcHashCode( const FString &k ); template<> bool __cmpHashKeys( const FString &a, const FString &b ); + template FBasicString operator +( const T *pLeft, const FBasicString &rRight ) + { + Bu::FBasicString ret( pLeft ); + ret.append( rRight ); + return ret; + } #ifdef BU_TRACE template<> void __tracer_format( const FString &v ); -- cgit v1.2.3