Skip to content

Commit

Permalink
Ignore internal deprecated warnings under msvc
Browse files Browse the repository at this point in the history
Signed-off-by: falkTX <falktx@falktx.com>
  • Loading branch information
falkTX committed Nov 20, 2022
1 parent 91d7afd commit 552aad8
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 14 deletions.
29 changes: 17 additions & 12 deletions dgl/Widget.hpp
Expand Up @@ -448,19 +448,24 @@ class Widget
A function called when a special key is pressed or released.
DEPRECATED use onKeyboard or onCharacterInput
*/
#if defined(__clang__)
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wdeprecated-declarations"
#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 460
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4996)
#elif defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 460
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
virtual bool onSpecial(const SpecialEvent&) { return false; }
#if defined(__clang__)
# pragma clang diagnostic pop
#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 460
# pragma GCC diagnostic pop
#endif
#if defined(_MSC_VER)
#pragma warning(pop)
#elif defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__) && (__GNUC__ * 100 + __GNUC_MINOR__) >= 460
#pragma GCC diagnostic pop
#endif

private:
struct PrivateData;
Expand Down
9 changes: 7 additions & 2 deletions distrho/src/DistrhoPlugin.cpp
Expand Up @@ -195,7 +195,10 @@ void Plugin::initState(const uint32_t index, State& state)
uint hints = 0x0;
String stateKey, defaultStateValue;

#if defined(__clang__)
#if defined(_MSC_VER)
#pragma warning(push)
#pragma warning(disable:4996)
#elif defined(__clang__)
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
Expand All @@ -205,7 +208,9 @@ void Plugin::initState(const uint32_t index, State& state)
initState(index, stateKey, defaultStateValue);
if (isStateFile(index))
hints = kStateIsFilenamePath;
#if defined(__clang__)
#if defined(_MSC_VER)
#pragma warning(pop)
#elif defined(__clang__)
#pragma clang diagnostic pop
#elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 6))
#pragma GCC diagnostic pop
Expand Down

0 comments on commit 552aad8

Please sign in to comment.