diff options
Diffstat (limited to 'src/misc')
-rw-r--r-- | src/misc/array.hpp | 4 | ||||
-rw-r--r-- | src/misc/binaryheap.hpp | 8 | ||||
-rw-r--r-- | src/misc/fixedsizearray.hpp | 4 |
3 files changed, 13 insertions, 3 deletions
diff --git a/src/misc/array.hpp b/src/misc/array.hpp index 3434ca21f..5eae3e488 100644 --- a/src/misc/array.hpp +++ b/src/misc/array.hpp @@ -76,6 +76,10 @@ public: return item; } + /** + * Helper for creating a human readable output of this data. + * @param dmp The location to dump to. + */ template <typename D> void Dump(D &dmp) const { dmp.WriteLine("capacity = %d", Tcapacity); 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) diff --git a/src/misc/fixedsizearray.hpp b/src/misc/fixedsizearray.hpp index c9e4ea59a..8b82373fa 100644 --- a/src/misc/fixedsizearray.hpp +++ b/src/misc/fixedsizearray.hpp @@ -31,8 +31,8 @@ protected: }; /* make constants visible from outside */ - static const uint Tsize = sizeof(T); // size of item - static const uint HeaderSize = sizeof(ArrayHeader); // size of header + static const uint Tsize = sizeof(T); ///< size of item + static const uint HeaderSize = sizeof(ArrayHeader); ///< size of header /** * the only member of fixed size array is pointer to the block |