From 52fa9f8fbc2b58f987e6cf7af110b3b5ba98a9e1 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Mon, 1 Apr 2013 10:38:31 +0100 Subject: Add macro for marking methods as deprecated. --- include/inspircd.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include/inspircd.h') diff --git a/include/inspircd.h b/include/inspircd.h index 86853a94f..054b7c148 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -46,6 +46,15 @@ #define CUSTOM_PRINTF(STRING, FIRST) #endif +#if defined __clang__ || defined __GNUC__ +# define DEPRECATED_METHOD(function) function __attribute__((deprecated)) +#elif defined _MSC_VER +# define DEPRECATED_METHOD(function) __declspec(deprecated) function +#else +# pragma message ("Warning! DEPRECATED_METHOD() does not work on your compiler!") +# define DEPRECATED_METHOD(function) function +#endif + // Required system headers. #include #include -- cgit v1.2.3