diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-04-03 18:22:42 +0300 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-04-03 18:30:39 +0300 |
commit | 61c5883f4cb35cbb1016b9abcf0718ca4d967f3d (patch) | |
tree | d07a1e21f11ec0ac1d4cc979c92b5cf2b7894931 | |
parent | 9bc097419568e61018b95148ad2a8181665051f9 (diff) |
Simplify SAL_CONST_CAST and SAL_STATIC_CAST defns, mention they are obsolete
-rw-r--r-- | sal/inc/sal/types.h | 14 |
1 files changed, 2 insertions, 12 deletions
diff --git a/sal/inc/sal/types.h b/sal/inc/sal/types.h index 52b008f0937f..8d0bb7ebd029 100644 --- a/sal/inc/sal/types.h +++ b/sal/inc/sal/types.h @@ -351,22 +351,12 @@ typedef struct _sal_Sequence #endif -/** Wrap C++ const_cast, reinterpret_cast and static_cast expressions in - macros to keep code portable to old compilers (since most compilers still - lack RTTI support, dynamic_cast is not included here). +/* Historical macros, no need to use, old use cases should be replaced + * by their expansions. */ #ifdef __cplusplus -#if defined SAL_W32 || defined SOLARIS || defined LINUX || defined MACOSX || \ - defined FREEBSD || defined NETBSD || defined AIX || \ - defined OPENBSD || defined DRAGONFLY #define SAL_CONST_CAST(type, expr) (const_cast< type >(expr)) -#define SAL_REINTERPRET_CAST(type, expr) (reinterpret_cast< type >(expr)) #define SAL_STATIC_CAST(type, expr) (static_cast< type >(expr)) -#else /* SAL_W32, SOLARIS, LINUX */ -#define SAL_CONST_CAST(type, expr) ((type) (expr)) -#define SAL_REINTERPRET_CAST(type, expr) ((type) (expr)) -#define SAL_STATIC_CAST(type, expr) ((type) (expr)) -#endif /* SAL_W32, SOLARIS, LINUX */ #endif /* __cplusplus */ /** Definition of function throw clause macros. These have been introduced |