summaryrefslogtreecommitdiff
path: root/src/common/cbasetypes.h
diff options
context:
space:
mode:
authorFlipp <mysteriousragnarok@hotmail.com>2013-07-22 14:20:58 -0700
committerFlipp <mysteriousragnarok@hotmail.com>2013-07-22 14:20:58 -0700
commit056c181e1c163b7d49c87bc07bf82ef11fdbd539 (patch)
tree3d0e0857b3e6bdaff5ca5a9461d1d1e530b57dba /src/common/cbasetypes.h
parent0090e0303d9dd56e91b88fa331c3952097c592da (diff)
parentc0c254f14d0d65a8b7ec50720ed8d98b5a04919a (diff)
downloadhercules-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.h2
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