浏览代码

libobs/util: Define PRAGMA_WARN_DEPRECATION for MSVC

Define PRAGMA_WARN_DEPRECATION for MSVC to enable using that define for
cross-platform code, which allows us to write slightly less code when we
need to suppress this warning.
Ryan Foster 2 年之前
父节点
当前提交
39b4df12c8
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      libobs/util/c99defs.h

+ 1 - 1
libobs/util/c99defs.h

@@ -54,7 +54,7 @@
 #ifdef _MSC_VER
 #define PRAGMA_WARN_PUSH __pragma(warning(push))
 #define PRAGMA_WARN_POP __pragma(warning(pop))
-#define PRAGMA_WARN_DEPRECATION
+#define PRAGMA_WARN_DEPRECATION __pragma(warning(disable : 4996))
 #elif defined(__clang__)
 #define PRAGMA_WARN_PUSH _Pragma("clang diagnostic push")
 #define PRAGMA_WARN_POP _Pragma("clang diagnostic pop")