@@ -295,6 +295,8 @@ inline void OutputDebugFormatA(const char *pszFormat, ...) {
295295// This prints 'Hello World (i > 10)' and breaks in the debugger if the
296296// assertion doesn't hold.
297297//
298+
299+ #if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL
298300#define DXASSERT_ARGS (exp, fmt, ...) \
299301 do { \
300302 if (!(exp)) { \
@@ -304,6 +306,19 @@ inline void OutputDebugFormatA(const char *pszFormat, ...) {
304306 __debugbreak (); \
305307 } \
306308 } while (0 )
309+ #else
310+ #define DXASSERT_ARGS (exp, fmt, ...) \
311+ do { \
312+ if (!(exp)) { \
313+ OutputDebugFormatA (" Error: \t %s\n File:\n %s(%d)\n Func:\t %s.\n\t " fmt \
314+ " \n " , \
315+ " !(" #exp " )" , __FILE__, __LINE__, \
316+ __FUNCTION__ __VA_OPT__ (, ) __VA_ARGS__); \
317+ __debugbreak (); \
318+ } \
319+ } while (0 )
320+ #endif
321+
307322#define DXASSERT (exp, msg ) DXASSERT_ARGS(exp, msg)
308323
309324#define DXASSERT_LOCALVAR (local, exp, msg ) DXASSERT(exp, msg)
@@ -325,13 +340,23 @@ inline void OutputDebugFormatA(const char *pszFormat, ...) {
325340
326341#define DXVERIFY_NOMSG assert
327342
343+ #if !defined(_MSVC_TRADITIONAL) || _MSVC_TRADITIONAL
328344#define DXASSERT_ARGS (expr, fmt, ...) \
329345 do { \
330346 if (!(expr)) { \
331347 fprintf (stderr, fmt, __VA_ARGS__); \
332348 assert (false ); \
333349 } \
334350 } while (0 )
351+ #else
352+ #define DXASSERT_ARGS (expr, fmt, ...) \
353+ do { \
354+ if (!(expr)) { \
355+ fprintf (stderr, fmt __VA_OPT__ (, ) __VA_ARGS__); \
356+ assert (false ); \
357+ } \
358+ } while (0 )
359+ #endif
335360
336361#define DXASSERT (expr, msg ) \
337362 do { \
0 commit comments