aboutsummaryrefslogtreecommitdiff
path: root/src/stable/string.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/stable/string.cpp')
-rw-r--r--src/stable/string.cpp19
1 files changed, 15 insertions, 4 deletions
diff --git a/src/stable/string.cpp b/src/stable/string.cpp
index 4cef6b1..d1f76aa 100644
--- a/src/stable/string.cpp
+++ b/src/stable/string.cpp
@@ -1228,16 +1228,23 @@ bool Bu::String::isFlat() const
1228// Sub-class Bu::String::FormatProxy 1228// Sub-class Bu::String::FormatProxy
1229// 1229//
1230 1230
1231Bu::String::FormatProxy::FormatProxy( const String &rFmt ) : 1231Bu::String::FormatProxy::FormatProxy( const String &rFmt,
1232 rFmt( rFmt ) 1232 String::FormatProxyEndAction *pAct ) :
1233 rFmt( rFmt ),
1234 pAct( pAct ),
1235 bOpen( true )
1233{ 1236{
1234} 1237}
1235 1238
1236Bu::String::FormatProxy::~FormatProxy() 1239Bu::String::FormatProxy::~FormatProxy()
1237{ 1240{
1241 if( pAct && bOpen )
1242 end();
1243
1244 delete pAct;
1238} 1245}
1239 1246
1240Bu::String::FormatProxy::operator Bu::String() const 1247Bu::String Bu::String::FormatProxy::end() const
1241{ 1248{
1242 int iCount = lArgs.getSize(); 1249 int iCount = lArgs.getSize();
1243 ArgList::const_iterator *aArg = 1250 ArgList::const_iterator *aArg =
@@ -1287,8 +1294,12 @@ Bu::String::FormatProxy::operator Bu::String() const
1287 } 1294 }
1288 s++; 1295 s++;
1289 } 1296 }
1290 1297
1298 bOpen = false;
1291 delete[] aArg; 1299 delete[] aArg;
1300
1301 if( pAct )
1302 (*pAct)( mbOut.getString() );
1292 return mbOut.getString(); 1303 return mbOut.getString();
1293} 1304}
1294 1305