From 3f37dccb29658bf218fd63c66d7b94980b0c0ac3 Mon Sep 17 00:00:00 2001 From: Mikko Mononen Date: Sat, 3 May 2014 12:05:58 +0300 Subject: [PATCH] Fix for issue #78 - use one not used macro for all --- src/nanovg.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/nanovg.h b/src/nanovg.h index fb85b01..1328627 100644 --- a/src/nanovg.h +++ b/src/nanovg.h @@ -581,14 +581,7 @@ void nvgDeleteInternal(struct NVGcontext* ctx); // Debug function to dump cached path data. void nvgDebugDumpPathCache(struct NVGcontext* ctx); -// Compiler references -// http://sourceforge.net/p/predef/wiki/Compilers/ -#if _MSC_VER >= 1800 - // VS 2013 seems to be too smart for school, it will still list the variable as unused if passed into sizeof(). - #define NVG_NOTUSED(v) do { (void)(v); } while(0) -#else - #define NVG_NOTUSED(v) (void)sizeof(v) -#endif +#define NVG_NOTUSED(v) do { (void)(1 ? (void)0 : ( (void)(v) ) ); } while(0) #ifdef __cplusplus }