diff options
author | frosch <frosch@openttd.org> | 2010-08-01 19:22:34 +0000 |
---|---|---|
committer | frosch <frosch@openttd.org> | 2010-08-01 19:22:34 +0000 |
commit | ed4f806f1dcff2e10d2fdfb687e6bcebe9a81af3 (patch) | |
tree | dba65e1ae2fc4538779195db320eccfa441cbbd0 /src/misc/blob.hpp | |
parent | 4871baf44db96137cf4b72c4f9d9595b2c29f61d (diff) | |
download | openttd-ed4f806f1dcff2e10d2fdfb687e6bcebe9a81af3.tar.xz |
(svn r20283) -Codechange: Unify start of doygen comments.
Diffstat (limited to 'src/misc/blob.hpp')
-rw-r--r-- | src/misc/blob.hpp | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/src/misc/blob.hpp b/src/misc/blob.hpp index d77a1b9d8..95e0ae1af 100644 --- a/src/misc/blob.hpp +++ b/src/misc/blob.hpp @@ -16,7 +16,8 @@ #include "../core/mem_func.hpp" #include <new> -/** Base class for simple binary blobs. +/** + * Base class for simple binary blobs. * Item is byte. * The word 'simple' means: * - no configurable allocator type (always made from heap) @@ -102,7 +103,8 @@ protected: return (BlobHeader*)MallocT<byte>(num_bytes); } - /** Return header pointer to the static BlobHeader with + /** + * Return header pointer to the static BlobHeader with * both items and capacity containing zero */ static FORCEINLINE BlobHeader *Zero() { @@ -231,7 +233,8 @@ public: } } - /** Reallocate if there is no free space for num_bytes bytes. + /** + * Reallocate if there is no free space for num_bytes bytes. * @return pointer to the new data to be added */ FORCEINLINE byte *Prepare(size_t num_bytes) { @@ -240,7 +243,8 @@ public: return data + Length(); } - /** Increase Length() by num_bytes. + /** + * Increase Length() by num_bytes. * @return pointer to the new data added */ FORCEINLINE byte *Append(size_t num_bytes) { @@ -286,7 +290,8 @@ public: } }; -/** Blob - simple dynamic T array. T (template argument) is a placeholder for any type. +/** + * Blob - simple dynamic T array. T (template argument) is a placeholder for any type. * T can be any integral type, pointer, or structure. Using Blob instead of just plain C array * simplifies the resource management in several ways: * 1. When adding new item(s) it automatically grows capacity if needed. @@ -380,7 +385,8 @@ public: return (T*)base::Append(num_items * type_size); } - /** Ensures that given number of items can be added to the end of Blob. Returns pointer to the + /** + * Ensures that given number of items can be added to the end of Blob. Returns pointer to the * first free (unused) item */ FORCEINLINE T *MakeFreeSpace(size_t num_items) { |