summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2013-04-01 06:40:35 -0700
committerAttila Molnar <attilamolnar@hush.com>2013-04-01 06:40:35 -0700
commitba49d8eeabca0358314f36397abd56d8340f3753 (patch)
treef0752b61147dc964aa936217d10b069e5b24835c
parent65155ef5c520e89b1d96d1768c1d7308334940c9 (diff)
parent52fa9f8fbc2b58f987e6cf7af110b3b5ba98a9e1 (diff)
Merge pull request #455 from SaberUK/master+deprecation-macro
Add macro for marking methods as deprecated.
-rw-r--r--include/inspircd.h9
1 files changed, 9 insertions, 0 deletions
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 <ctime>
#include <cstdarg>