diff options
author | Flipp <mysteriousragnarok@hotmail.com> | 2013-07-22 14:20:58 -0700 |
---|---|---|
committer | Flipp <mysteriousragnarok@hotmail.com> | 2013-07-22 14:20:58 -0700 |
commit | 056c181e1c163b7d49c87bc07bf82ef11fdbd539 (patch) | |
tree | 3d0e0857b3e6bdaff5ca5a9461d1d1e530b57dba /src/common/cbasetypes.h | |
parent | 0090e0303d9dd56e91b88fa331c3952097c592da (diff) | |
parent | c0c254f14d0d65a8b7ec50720ed8d98b5a04919a (diff) | |
download | hercules-056c181e1c163b7d49c87bc07bf82ef11fdbd539.tar.gz hercules-056c181e1c163b7d49c87bc07bf82ef11fdbd539.tar.bz2 hercules-056c181e1c163b7d49c87bc07bf82ef11fdbd539.tar.xz hercules-056c181e1c163b7d49c87bc07bf82ef11fdbd539.zip |
Merge pull request #64 from piotrhalaczkiewicz/master
Binary heap fix & improvement.
Diffstat (limited to 'src/common/cbasetypes.h')
-rw-r--r-- | src/common/cbasetypes.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/common/cbasetypes.h b/src/common/cbasetypes.h index bfe8bf8f8..82ca9df69 100644 --- a/src/common/cbasetypes.h +++ b/src/common/cbasetypes.h @@ -300,6 +300,8 @@ typedef char bool; #endif #endif +#define swap_ptr(a,b) 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))) + #ifndef max #define max(a,b) (((a) > (b)) ? (a) : (b)) #endif |