]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/strvararg.h
set m_isBeingDeleted to true (only) in SendDestroyEvent(); call it as early as possib...
[wxWidgets.git] / include / wx / strvararg.h
index b7a1a19d865995dfc37ce303d1c72516334e9b85..ed16e5ed90fc5f5e2d2352debcd348b7181aeab7 100644 (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 wx_const_cast(wxFormatString*, this)->AsChar(); }
+        { 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)
@@ -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<wxFormatString*>(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;
     }