X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5c33522fca7cddc441a316f5b9fb50d7685435ba..b53aea81d2e102224b452ef5bf7aee1132f37c6f:/src/common/strvararg.cpp?ds=sidebyside diff --git a/src/common/strvararg.cpp b/src/common/strvararg.cpp index b06f3e6cf2..a10cdc26dd 100644 --- a/src/common/strvararg.cpp +++ b/src/common/strvararg.cpp @@ -611,6 +611,21 @@ const wchar_t* wxFormatString::AsWChar() } #endif // wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY +wxString wxFormatString::InputAsString() const +{ + if ( m_str ) + return *m_str; + if ( m_cstr ) + return m_cstr->AsString(); + if ( m_wchar ) + return wxString(m_wchar); + if ( m_char ) + return wxString(m_char); + + wxFAIL_MSG( "invalid wxFormatString - not initialized?" ); + return wxString(); +} + // ---------------------------------------------------------------------------- // wxFormatString::GetArgumentType() // ----------------------------------------------------------------------------