From 504370cafb1aaa36284688867fcaf7b29eb76848 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 10 Oct 2014 21:12:08 +0600 Subject: Code cleanup: Fix silly duplication of typecheck and swap macro --- source/blender/blenlib/BLI_math_base.h | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'source/blender/blenlib/BLI_math_base.h') diff --git a/source/blender/blenlib/BLI_math_base.h b/source/blender/blenlib/BLI_math_base.h index 494bc4083ba..07de074e717 100644 --- a/source/blender/blenlib/BLI_math_base.h +++ b/source/blender/blenlib/BLI_math_base.h @@ -146,32 +146,6 @@ static const int NAN_INT = 0x7FC00000; # endif #endif -/* Causes warning: - * incompatible types when assigning to type 'Foo' from type 'Bar' - * ... the compiler optimizes away the temp var */ -#ifndef CHECK_TYPE -#ifdef __GNUC__ -#define CHECK_TYPE(var, type) { \ - typeof(var) *__tmp; \ - __tmp = (type *)NULL; \ - (void)__tmp; \ -} (void)0 -#else -#define CHECK_TYPE(var, type) -#endif -#endif - -#ifndef SWAP -# define SWAP(type, a, b) { \ - type sw_ap; \ - CHECK_TYPE(a, type); \ - CHECK_TYPE(b, type); \ - sw_ap = (a); \ - (a) = (b); \ - (b) = sw_ap; \ -} (void)0 -#endif - #if BLI_MATH_DO_INLINE #include "intern/math_base_inline.c" #endif -- cgit v1.2.3