bogus assert removed, optimized (and removed a bug in process of doing it)

wxString::Trim


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@799 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1998-10-03 00:25:17 +00:00
parent 524bf39144
commit 2c3b684c2b
2 changed files with 34 additions and 24 deletions

View File

@@ -257,10 +257,10 @@ public:
size_t Len() const { return GetStringData()->nDataLength; }
/// string contains any characters?
bool IsEmpty() const { return Len() == 0; }
/// reinitialize string (and free data!)
/// reinitialize string (and free memory)
void Empty()
{
if ( GetStringData()->nDataLength != 0 )
if ( !IsEmpty() )
Reinit();
wxASSERT( GetStringData()->nDataLength == 0 );