X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/5431a79f1e329263347e07109fa101fba7510a02..c6212a0cb7e6285f62198a9411d91bbe8dc06e60:/include/wx/strvararg.h diff --git a/include/wx/strvararg.h b/include/wx/strvararg.h index b7a1a19d86..ed16e5ed90 100644 --- a/include/wx/strvararg.h +++ b/include/wx/strvararg.h @@ -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 wx_const_cast(wxFormatString*, this)->AsChar(); } + { return const_cast(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) @@ -170,7 +174,7 @@ private: #if wxUSE_UNICODE && !wxUSE_UTF8_LOCALE_ONLY public: operator const wchar_t*() const - { return wx_const_cast(wxFormatString*, this)->AsWChar(); } + { return const_cast(this)->AsWChar(); } private: const wchar_t* InputAsWChar(); const wchar_t* AsWChar(); @@ -564,7 +568,7 @@ struct wxArgNormalizerNarrowChar // FIXME-UTF8: which one is better default in absence of fmt string // (i.e. when used like e.g. Foo("foo", "bar", 'c', NULL)? if ( !fmt || fmt->GetArgumentType(index) == wxFormatString::Arg_Char ) - m_value = wxUniChar(value).GetValue(); + m_value = wx_truncate_cast(T, wxUniChar(value).GetValue()); else m_value = value; }