another fix to the wxFormatConverter bug with the formats which don't have to be converted

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16796 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2002-08-26 21:15:04 +00:00
parent 9b601c243f
commit c03d003515

View File

@ -566,7 +566,10 @@ class wxFormatConverter
public:
wxFormatConverter(const wxChar *format);
operator const wxChar *() const { return m_nCopied ? m_fmtOrig : m_fmt.c_str(); }
// notice that we only translated the string if m_fmtOrig == NULL (as set
// by CopyAllBefore()), otherwise we should simply use the original format
operator const wxChar *() const
{ return m_fmtOrig ? m_fmtOrig : m_fmt.c_str(); }
private:
// copy another character to the translated format: this function does the
@ -577,7 +580,7 @@ private:
{
if ( !m_fmtOrig )
{
// we're translating, d copy
// we're translating, do copy
m_fmt += ch;
}
else