feat(src/misc): moved macros to misc

This commit is contained in:
2025-03-20 14:25:51 -04:00
parent 171fbf7961
commit 1cc21a368b
4 changed files with 50 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
#ifndef WARNING_CONTROL_H
#define WARNING_CONTROL_H
#if defined(__GNUC__) || defined(__clang__)
#define DEPRECATION_WARNING_OFF _Pragma("GCC diagnostic push") \
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"")
#define DEPRECATION_WARNING_ON _Pragma("GCC diagnostic pop")
#elif defined(_MSC_VER)
#define DEPRECATION_WARNING_OFF __pragma(warning(push)) __pragma(warning(disable: 4996))
#define DEPRECATION_WARNING_ON __pragma(warning(pop))
#else
#define DEPRECATION_WARNING_OFF
#define DEPRECATION_WARNING_ON
#endif
#endif // WARNING_CONTROL_H