summaryrefslogtreecommitdiff
path: root/src/misc/binaryheap.hpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2011-05-02 17:42:12 +0000
committerrubidium <rubidium@openttd.org>2011-05-02 17:42:12 +0000
commitfb5ecb94992e7febf4bc059cb6ec4a51f50c66b0 (patch)
tree87956636c318baa8d5d8d62f13263c4f64dbe881 /src/misc/binaryheap.hpp
parent4d5dbf51707c42c24eeafdb65016b079c54adcf2 (diff)
downloadopenttd-fb5ecb94992e7febf4bc059cb6ec4a51f50c66b0.tar.xz
(svn r22411) -Document: another bunch of bits
Diffstat (limited to 'src/misc/binaryheap.hpp')
-rw-r--r--src/misc/binaryheap.hpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/misc/binaryheap.hpp b/src/misc/binaryheap.hpp
index c0aee7f2d..76f93371e 100644
--- a/src/misc/binaryheap.hpp
+++ b/src/misc/binaryheap.hpp
@@ -14,12 +14,14 @@
#include "../core/alloc_func.hpp"
-/* Enable it if you suspect binary heap doesn't work well */
+/** Enable it if you suspect binary heap doesn't work well */
#define BINARYHEAP_CHECK 0
#if BINARYHEAP_CHECK
+ /** Check for consistency. */
#define CHECK_CONSISTY() this->CheckConsistency()
#else
+ /** Don't check for consistency. */
#define CHECK_CONSISTY() ;
#endif
@@ -55,6 +57,10 @@ private:
T **data; ///< The pointer to the heap item pointers
public:
+ /**
+ * Create a binary heap.
+ * @param max_items The limit of the heap
+ */
explicit CBinaryHeapT(uint max_items)
: items(0)
, capacity(max_items)