]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/longlong.h
Split wxWebHistoryItem headers out into separate files for each backend. This will...
[wxWidgets.git] / include / wx / longlong.h
index f248bb6d21ac7721ccf00f18e03515052b87f172..7c76d5f6778ba3fe641e50c08c112c088fe25ac9 100644 (file)
@@ -1113,6 +1113,33 @@ template<> class numeric_limits<wxULongLong>
 
 #endif // wxUSE_LONGLONG_NATIVE
 
 
 #endif // wxUSE_LONGLONG_NATIVE
 
+// ----------------------------------------------------------------------------
+// Specialize wxArgNormalizer to allow using wxLongLong directly with wx pseudo
+// vararg functions.
+// ----------------------------------------------------------------------------
+
+// Notice that this must be done here and not in wx/strvararg.h itself because
+// we can't include wx/longlong.h from there as this header itself includes
+// wx/string.h which includes wx/strvararg.h too, so to avoid the circular
+// dependencies we can only do it here (or add another header just for this but
+// it doesn't seem necessary).
+#include "wx/strvararg.h"
+
+template<>
+struct WXDLLIMPEXP_BASE wxArgNormalizer<wxLongLong>
+{
+     wxArgNormalizer(wxLongLong value,
+                     const wxFormatString *fmt, unsigned index)
+         : m_value(value)
+     {
+         wxASSERT_ARG_TYPE( fmt, index, wxFormatString::Arg_LongLongInt );
+     }
+
+     wxLongLong_t get() const { return m_value.GetValue(); }
+
+     wxLongLong m_value;
+};
+
 #endif // wxUSE_LONGLONG
 
 #endif // _WX_LONGLONG_H
 #endif // wxUSE_LONGLONG
 
 #endif // _WX_LONGLONG_H