]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/strvararg.h
support SDK < 10.6, fixes #14902
[wxWidgets.git] / include / wx / strvararg.h
index 7dc661217176289ecd1f85948903f076d8bdaf80..8f2d16551ecc25c592cd497274ef276b1d149699 100644 (file)
@@ -207,7 +207,7 @@ public:
         { return const_cast<wxFormatString*>(this)->AsChar(); }
 private:
     // InputAsChar() returns the value passed to ctor, only converted
         { return const_cast<wxFormatString*>(this)->AsChar(); }
 private:
     // InputAsChar() returns the value passed to ctor, only converted
-    // to char, while AsChar() takes the the string returned by InputAsChar()
+    // to char, while AsChar() takes the string returned by InputAsChar()
     // and does format string conversion on it as well (and similarly for
     // ..AsWChar() below)
     const char* InputAsChar();
     // and does format string conversion on it as well (and similarly for
     // ..AsWChar() below)
     const char* InputAsChar();
@@ -309,14 +309,13 @@ struct wxFormatStringArgumentFinder<wxWCharBuffer>
     // the correct type (one of wxFormatString::Arg_XXX or-combination in
     // 'expected_mask').
     #define wxASSERT_ARG_TYPE(fmt, index, expected_mask)                    \
     // the correct type (one of wxFormatString::Arg_XXX or-combination in
     // 'expected_mask').
     #define wxASSERT_ARG_TYPE(fmt, index, expected_mask)                    \
-        do                                                                  \
-        {                                                                   \
+        wxSTATEMENT_MACRO_BEGIN                                             \
             if ( !fmt )                                                     \
                 break;                                                      \
             const int argtype = fmt->GetArgumentType(index);                \
             wxASSERT_MSG( (argtype & (expected_mask)) == argtype,           \
                           "format specifier doesn't match argument type" ); \
             if ( !fmt )                                                     \
                 break;                                                      \
             const int argtype = fmt->GetArgumentType(index);                \
             wxASSERT_MSG( (argtype & (expected_mask)) == argtype,           \
                           "format specifier doesn't match argument type" ); \
-        } while ( wxFalse )
+        wxSTATEMENT_MACRO_END
 #else
     // Just define it to suppress "unused parameter" warnings for the
     // parameters which we don't use otherwise
 #else
     // Just define it to suppress "unused parameter" warnings for the
     // parameters which we don't use otherwise
@@ -825,7 +824,7 @@ WX_ARG_NORMALIZER_FORWARD(const signed char&, signed char);
 #undef WX_ARG_NORMALIZER_FORWARD
 #undef _WX_ARG_NORMALIZER_FORWARD_IMPL
 
 #undef WX_ARG_NORMALIZER_FORWARD
 #undef _WX_ARG_NORMALIZER_FORWARD_IMPL
 
-#undef wxASSERT_ARG_TYPE
+// NB: Don't #undef wxASSERT_ARG_TYPE here as it's also used in wx/longlong.h.
 
 // ----------------------------------------------------------------------------
 // WX_VA_ARG_STRING
 
 // ----------------------------------------------------------------------------
 // WX_VA_ARG_STRING