From 2478dbfdb7a3b5d10738f16128e5a7afd5d429e1 Mon Sep 17 00:00:00 2001 From: omar Date: Fri, 17 Jan 2020 14:18:16 +0100 Subject: [PATCH] Disable warning C5054 introduced in VS 2019 16.2 (#2983) --- imgui.cpp | 3 +++ imgui_widgets.cpp | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/imgui.cpp b/imgui.cpp index 09a315ccc..6ef20da82 100644 --- a/imgui.cpp +++ b/imgui.cpp @@ -812,6 +812,9 @@ CODE #ifdef _MSC_VER #pragma warning (disable: 4127) // condition expression is constant #pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen +#if defined(_MSC_VER) && _MSC_VER >= 1922 // MSVC 2019 16.2 or later +#pragma warning (disable: 5054) // operator '|': deprecated between enumerations of different types +#endif #endif // Clang/GCC warnings with -Weverything diff --git a/imgui_widgets.cpp b/imgui_widgets.cpp index cf437c7e1..124594db8 100644 --- a/imgui_widgets.cpp +++ b/imgui_widgets.cpp @@ -47,8 +47,11 @@ Index of this file: // Visual Studio warnings #ifdef _MSC_VER -#pragma warning (disable: 4127) // condition expression is constant -#pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen +#pragma warning (disable: 4127) // condition expression is constant +#pragma warning (disable: 4996) // 'This function or variable may be unsafe': strcpy, strdup, sprintf, vsnprintf, sscanf, fopen +#if defined(_MSC_VER) && _MSC_VER >= 1922 // MSVC 2019 16.2 or later +#pragma warning (disable: 5054) // operator '|': deprecated between enumerations of different types +#endif #endif // Clang/GCC warnings with -Weverything