From a9005e55f16690b574c98bee72ef83d021981b2a Mon Sep 17 00:00:00 2001 From: Michael Haberler Date: Sun, 9 Aug 2015 20:35:17 +0200 Subject: [PATCH] c++: introduce CK_CPP_CAST to static_cast arguments --- include/ck_cc.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/include/ck_cc.h b/include/ck_cc.h index 30ec383..b588616 100644 --- a/include/ck_cc.h +++ b/include/ck_cc.h @@ -162,4 +162,11 @@ ck_cc_popcount(unsigned int x) } #endif + +#ifdef __cplusplus +#define CK_CPP_CAST(type, arg) static_cast(arg) +#else +#define CK_CPP_CAST(type, arg) arg +#endif + #endif /* CK_CC_H */