From ed955ed149afb4d7dc50b3f362584579481a173b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Branimir=20Karad=C5=BEi=C4=87?= Date: Mon, 28 Apr 2014 19:45:49 -0700 Subject: [PATCH] Fixed VS2012 compile error. --- examples/common/nanovg/nanovg.h | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/examples/common/nanovg/nanovg.h b/examples/common/nanovg/nanovg.h index 71f90de01..e413a7324 100644 --- a/examples/common/nanovg/nanovg.h +++ b/examples/common/nanovg/nanovg.h @@ -534,14 +534,7 @@ struct NVGcontext* nvgCreate(int atlasw, int atlash, int edgeaa); // void nvgDelete(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)(true ? (void)0 : ( (void)(v) ) ); } while(0) #ifdef __cplusplus }