From 525f902e92f2391840816c53a043ffbe2f883a05 Mon Sep 17 00:00:00 2001 From: Matheus Macabu Date: Sat, 14 May 2016 14:54:16 -0300 Subject: Removed dead leftover code from some testing a while ago. --- src/common/cbasetypes.h | 18 ------------------ 1 file changed, 18 deletions(-) (limited to 'src') diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index 78e5512ba..d3db86543 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -329,24 +329,6 @@ typedef char bool; //#define swap(a,b) if (a != b) ((a ^= b), (b ^= a), (a ^= b)) // but is vulnerable to 'if (foo) swap(bar, baz); else quux();', causing the else to nest incorrectly. #define swap(a,b) do { if ((a) != (b)) { (a) ^= (b); (b) ^= (a); (a) ^= (b); } } while(0) -#if 0 //to be activated soon, more tests needed on how VS works with the macro above -#ifdef WIN32 -#undef swap -#define swap(a,b)__asm { \ - __asm mov eax, dword ptr [a] \ - __asm cmp eax, dword ptr [b] \ - __asm je _ret \ - __asm xor eax, dword ptr [b] \ - __asm mov dword ptr [a], eax \ - __asm xor eax, dword ptr [b] \ - __asm mov dword ptr [b], eax \ - __asm xor eax, dword ptr [a] \ - __asm mov dword ptr [a], eax \ - __asm _ret: \ -} -#endif -#endif - #define swap_ptr(a,b) do { if ((a) != (b)) (a) = (void*)((intptr_t)(a) ^ (intptr_t)(b)); (b) = (void*)((intptr_t)(a) ^ (intptr_t)(b)); (a) = (void*)((intptr_t)(a) ^ (intptr_t)(b)); } while(0) #ifndef max -- cgit v1.2.3-70-g09d2