silence gcc warnings in "vararg" functions such as wxPrintf when compiling with -Wformat-security

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@58126 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2009-01-16 12:07:47 +00:00
parent 8eff6c56f0
commit e68a8744ee
3 changed files with 34 additions and 9 deletions

View File

@@ -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()
// ----------------------------------------------------------------------------