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

@@ -154,11 +154,15 @@ public:
// n-th variadic argument desired representation
ArgumentType GetArgumentType(unsigned n) const;
// returns the value passed to ctor, only converted to wxString, similarly
// to other InputAsXXX() methods
wxString InputAsString() const;
#if !wxUSE_UNICODE_WCHAR
operator const char*() const
{ return const_cast<wxFormatString*>(this)->AsChar(); }
private:
// InputAsChar() returns the value converted passed to ctor, only converted
// InputAsChar() returns the value passed to ctor, only converted
// to char, while AsChar() takes the the string returned by InputAsChar()
// and does format string conversion on it as well (and similarly for
// ..AsWChar() below)