Просмотр исходного кода

update STBIR__UNUSED_PARAM to match stb_image.h version

Sean Barrett 11 лет назад
Родитель
Сommit
df128b7995
1 измененных файлов с 5 добавлено и 1 удалено
  1. 5 1
      stb_image_resize.h

+ 5 - 1
stb_image_resize.h

@@ -403,7 +403,11 @@ typedef unsigned char stbir__validate_uint32[sizeof(stbir_uint32) == 4 ? 1 : -1]
 
 
 
 
 
 
-#define STBIR__UNUSED_PARAM(s) s=s;
+#ifdef _MSC_VER
+#define STBIR__UNUSED_PARAM(v)  (void)(v)
+#else
+#define STBIR__UNUSED_PARAM(v)  (void)sizeof(v)
+#endif
 
 
 // must match stbir_datatype
 // must match stbir_datatype
 static unsigned char stbir__type_size[] = {
 static unsigned char stbir__type_size[] = {