Correct example in wxStringBufferLength documentation.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@61501 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2009-07-22 23:23:01 +00:00
parent 581c5049b1
commit 2839804c35

View File

@ -1540,16 +1540,13 @@ wxString wxEmptyString;
@code @code
wxString theAnswer; wxString theAnswer;
wxStringBuffer theAnswerBuffer(theAnswer, 1024); wxStringBufferLength theAnswerBuffer(theAnswer, 1024);
int nLength = GetMeaningOfLifeAsString(theAnswerBuffer); int nLength = GetMeaningOfLifeAsString(theAnswerBuffer);
theAnswerBuffer.SetLength(nLength); theAnswerBuffer.SetLength(nLength);
if ( theAnswer != "42" ) if ( theAnswer != "42" )
wxLogError("Something is very wrong!"); wxLogError("Something is very wrong!");
@endcode @endcode
@todo
the example above does not make use of wxStringBufferLength??
Note that the exact usage of this depends on whether or not wxUSE_STL is Note that the exact usage of this depends on whether or not wxUSE_STL is
enabled. If wxUSE_STL is enabled, wxStringBuffer creates a separate empty enabled. If wxUSE_STL is enabled, wxStringBuffer creates a separate empty
character buffer, and if wxUSE_STL is disabled, it uses GetWriteBuf() from character buffer, and if wxUSE_STL is disabled, it uses GetWriteBuf() from