From 8be1060ec4eed9b498109e5cb922215e63c20f2f Mon Sep 17 00:00:00 2001 From: Kim Kulling Date: Fri, 13 Dec 2019 08:21:45 +0100 Subject: [PATCH] Update m3d.h Fix vs-defines for unused define as well. --- code/M3D/m3d.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/code/M3D/m3d.h b/code/M3D/m3d.h index 5d78374f0..a36cc9613 100644 --- a/code/M3D/m3d.h +++ b/code/M3D/m3d.h @@ -95,7 +95,11 @@ typedef uint16_t M3D_INDEX; #else #define _inline #define _pack -#define _unused __pragma(warning(suppress:4100)) +# ifdef __cplusplus // only for c++ code +# define _unused __pragma(warning(suppress:4100)) +# else // or c code just use void +# define _unused (void) +# endif // ___cplusplus #endif #ifndef __cplusplus #define _register register