Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht@blender.org>2022-08-19 21:32:42 +0300
committerBrecht Van Lommel <brecht@blender.org>2022-08-19 21:36:02 +0300
commit4b62970dd378164a9f5d4592f923ae92a894da87 (patch)
tree4f903bcdfa37669e851b2a168290c856894ef969 /intern/cycles/util/defines.h
parentbe5c296e522474aeb15b12562e68faea255b7f3b (diff)
Cleanup: replace CHECK_TYPE macro with static_assert
To avoid conflicts with BLI headers and simplify code.
Diffstat (limited to 'intern/cycles/util/defines.h')
-rw-r--r--intern/cycles/util/defines.h40
1 files changed, 0 insertions, 40 deletions
diff --git a/intern/cycles/util/defines.h b/intern/cycles/util/defines.h
index d0df1a221fc..56a41a1dc45 100644
--- a/intern/cycles/util/defines.h
+++ b/intern/cycles/util/defines.h
@@ -89,46 +89,6 @@
# define UNLIKELY(x) (x)
#endif
-#if defined(__GNUC__) || defined(__clang__)
-# if defined(__cplusplus)
-/* Some magic to be sure we don't have reference in the type. */
-template<typename T> static inline T decltype_helper(T x)
-{
- return x;
-}
-# define TYPEOF(x) decltype(decltype_helper(x))
-# else
-# define TYPEOF(x) typeof(x)
-# endif
-#endif
-
-/* Causes warning:
- * incompatible types when assigning to type 'Foo' from type 'Bar'
- * ... the compiler optimizes away the temp var */
-#ifdef __GNUC__
-# define CHECK_TYPE(var, type) \
- { \
- TYPEOF(var) * __tmp; \
- __tmp = (type *)NULL; \
- (void)__tmp; \
- } \
- (void)0
-
-# define CHECK_TYPE_PAIR(var_a, var_b) \
- { \
- TYPEOF(var_a) * __tmp; \
- __tmp = (typeof(var_b) *)NULL; \
- (void)__tmp; \
- } \
- (void)0
-#else
-# define CHECK_TYPE(var, type)
-# define CHECK_TYPE_PAIR(var_a, var_b)
-#endif
-
-/* can be used in simple macros */
-#define CHECK_TYPE_INLINE(val, type) ((void)(((type)0) != (val)))
-
#ifndef __KERNEL_GPU__
# include <cassert>
# define util_assert(statement) assert(statement)