浏览代码

Added UNUSED_PARAMS macros (will replace pragma unused)

Marco Bambini 8 年之前
父节点
当前提交
803efd85bd
共有 1 个文件被更改,包括 6 次插入0 次删除
  1. 6 0
      src/shared/gravity_macros.h

+ 6 - 0
src/shared/gravity_macros.h

@@ -11,6 +11,12 @@
 
 #define AUTOLENGTH							UINT32_MAX
 
+// MARK: -
+// pragma unused is not recognized by VC
+#define UNUSED_PARAM(_x)					(void)(_x)
+#define UNUSED_PARAM2(_x,_y)				UNUSED_PARAM(_x),UNUSED_PARAM(_y)
+#define UNUSED_PARAM3(_x,_y,_z)				UNUSED_PARAM(_x),UNUSED_PARAM(_y),UNUSED_PARAM(_z)
+
 // MARK: -
 #define VALUE_AS_OBJECT(x)					((x).p)
 #define VALUE_AS_STRING(x)					((gravity_string_t *)VALUE_AS_OBJECT(x))