diff options
author | Matheus Macabu <mkbu95@gmail.com> | 2016-05-14 14:54:16 -0300 |
---|---|---|
committer | Matheus Macabu <mkbu95@gmail.com> | 2016-05-14 14:54:16 -0300 |
commit | 525f902e92f2391840816c53a043ffbe2f883a05 (patch) | |
tree | 31056e34f11eb0a31a5c514cad4078e809b3996b | |
parent | f651258108a1ca6e071ea7f0b790d5cb1834f7d2 (diff) | |
download | hercules-525f902e92f2391840816c53a043ffbe2f883a05.tar.gz hercules-525f902e92f2391840816c53a043ffbe2f883a05.tar.bz2 hercules-525f902e92f2391840816c53a043ffbe2f883a05.tar.xz hercules-525f902e92f2391840816c53a043ffbe2f883a05.zip |
Removed dead leftover code from some testing a while ago.
-rw-r--r-- | src/common/cbasetypes.h | 18 |
1 files changed, 0 insertions, 18 deletions
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 |