From 3fb529c0ee2ba6b6318ec4fea86fd96e655f10e5 Mon Sep 17 00:00:00 2001 From: Ryan Foster Date: Mon, 22 Jan 2024 11:26:37 -0500 Subject: [PATCH] libobs: Use std _Pragma with MSVC Instead of using the Microsoft-specific __pragma keyword, use the standard _Pragma directive, which is now supported in C11 and C++11 /std modes. --- libobs/util/c99defs.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libobs/util/c99defs.h b/libobs/util/c99defs.h index e3dd135e3..46012a4a4 100644 --- a/libobs/util/c99defs.h +++ b/libobs/util/c99defs.h @@ -52,9 +52,9 @@ #endif #ifdef _MSC_VER -#define PRAGMA_WARN_PUSH __pragma(warning(push)) -#define PRAGMA_WARN_POP __pragma(warning(pop)) -#define PRAGMA_WARN_DEPRECATION __pragma(warning(disable : 4996)) +#define PRAGMA_WARN_PUSH _Pragma("warning(push)") +#define PRAGMA_WARN_POP _Pragma("warning(pop)") +#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")