diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2011-09-11 20:47:31 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2011-09-11 20:47:31 +0200 |
commit | d88bceafa0227e0e7bfe6bad1221eb93d3a9619a (patch) | |
tree | 90a6d3abe24735ff547c1483a612c38dd8f32a77 /sal | |
parent | c3863453910ac871fa3e4e7af6f81f6f1a54909e (diff) |
Simplified SAL_DEPRECATED, does not need to abstract over func.
Cf. page 260 of Martin Reddy: API Design for C++ (MK, 2011).
Diffstat (limited to 'sal')
-rw-r--r-- | sal/inc/sal/types.h | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h index ba7655be785c..df2b96317875 100644 --- a/sal/inc/sal/types.h +++ b/sal/inc/sal/types.h @@ -442,18 +442,18 @@ template< typename T1, typename T2 > inline T1 static_int_cast(T2 n) { /** Use as follows: - void SAL_DEPRECATED(doit(int nPara), "Dont use, its evil."); + SAL_DEPRECATED("Dont use, its evil.") void doit(int nPara); note that currently a c++0x compatible gcc disables deprecation warnings */ #if (__GNUC__ > 5 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 5)) -# define SAL_DEPRECATED(func,message) func __attribute__((deprecated(message))) +# define SAL_DEPRECATED(message) __attribute__((deprecated(message))) #elif (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 1)) -# define SAL_DEPRECATED(func,message) func __attribute__((deprecated)) +# define SAL_DEPRECATED(message) __attribute__((deprecated)) #elif defined(_MSC_VER) -# define SAL_DEPRECATED(func,message) __declspec(deprecated(message)) func +# define SAL_DEPRECATED(message) __declspec(deprecated(message)) #else -# define SAL_DEPRECATED(func,message) +# define SAL_DEPRECATED(message) #endif #endif /*_SAL_TYPES_H_ */ |