Commit 0f48acf2 authored by Kirill Gavrilov's avatar Kirill Gavrilov Committed by Michael Niedermayer

lavu: provide msvc implementation of attribute_deprecated

Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 50b90d5e
...@@ -86,6 +86,8 @@ ...@@ -86,6 +86,8 @@
#if AV_GCC_VERSION_AT_LEAST(3,1) #if AV_GCC_VERSION_AT_LEAST(3,1)
# define attribute_deprecated __attribute__((deprecated)) # define attribute_deprecated __attribute__((deprecated))
#elif defined(_MSC_VER)
# define attribute_deprecated __declspec(deprecated)
#else #else
# define attribute_deprecated # define attribute_deprecated
#endif #endif
...@@ -102,6 +104,12 @@ ...@@ -102,6 +104,12 @@
_Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \ _Pragma("GCC diagnostic ignored \"-Wdeprecated-declarations\"") \
code \ code \
_Pragma("GCC diagnostic pop") _Pragma("GCC diagnostic pop")
#elif defined(_MSC_VER)
# define AV_NOWARN_DEPRECATED(code) \
__pragma(warning(push)) \
__pragma(warning(disable : 4996)) \
code; \
__pragma(warning(pop))
#else #else
# define AV_NOWARN_DEPRECATED(code) code # define AV_NOWARN_DEPRECATED(code) code
#endif #endif
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment