summaryrefslogtreecommitdiff
path: root/src/misc
diff options
context:
space:
mode:
authorfrosch <frosch@openttd.org>2010-08-01 19:44:49 +0000
committerfrosch <frosch@openttd.org>2010-08-01 19:44:49 +0000
commit4bd32799f13480763bfb58db82bb98d1500753ae (patch)
tree3aff9492cad51a7cb456158b0a3a32c90f978fe4 /src/misc
parent613b273f36ffd1d300ea08c5d6b1c469d145a591 (diff)
downloadopenttd-4bd32799f13480763bfb58db82bb98d1500753ae.tar.xz
(svn r20286) -Codechange: Unify end of doxygen comments.
Diffstat (limited to 'src/misc')
-rw-r--r--src/misc/array.hpp3
-rw-r--r--src/misc/blob.hpp15
-rw-r--r--src/misc/fixedsizearray.hpp6
-rw-r--r--src/misc/hashtable.hpp3
4 files changed, 18 insertions, 9 deletions
diff --git a/src/misc/array.hpp b/src/misc/array.hpp
index 2832d9299..e6850d665 100644
--- a/src/misc/array.hpp
+++ b/src/misc/array.hpp
@@ -17,7 +17,8 @@
/**
* Flexible array with size limit. Implemented as fixed size
- * array of fixed size arrays */
+ * array of fixed size arrays
+ */
template <class T, uint B = 1024, uint N = B>
class SmallArray {
protected:
diff --git a/src/misc/blob.hpp b/src/misc/blob.hpp
index 95e0ae1af..ff9cebd67 100644
--- a/src/misc/blob.hpp
+++ b/src/misc/blob.hpp
@@ -105,7 +105,8 @@ protected:
/**
* Return header pointer to the static BlobHeader with
- * both items and capacity containing zero */
+ * both items and capacity containing zero
+ */
static FORCEINLINE BlobHeader *Zero()
{
return const_cast<BlobHeader *>(&ByteBlob::hdrEmpty[1]);
@@ -235,7 +236,8 @@ public:
/**
* Reallocate if there is no free space for num_bytes bytes.
- * @return pointer to the new data to be added */
+ * @return pointer to the new data to be added
+ */
FORCEINLINE byte *Prepare(size_t num_bytes)
{
size_t new_size = Length() + num_bytes;
@@ -245,7 +247,8 @@ public:
/**
* Increase Length() by num_bytes.
- * @return pointer to the new data added */
+ * @return pointer to the new data added
+ */
FORCEINLINE byte *Append(size_t num_bytes)
{
byte *pNewData = Prepare(num_bytes);
@@ -297,7 +300,8 @@ public:
* 1. When adding new item(s) it automatically grows capacity if needed.
* 2. When variable of type Blob comes out of scope it automatically frees the data buffer.
* 3. Takes care about the actual data size (number of used items).
- * 4. Dynamically constructs only used items (as opposite of static array which constructs all items) */
+ * 4. Dynamically constructs only used items (as opposite of static array which constructs all items)
+ */
template <typename T>
class CBlobT : public ByteBlob {
/* make template arguments public: */
@@ -387,7 +391,8 @@ public:
/**
* Ensures that given number of items can be added to the end of Blob. Returns pointer to the
- * first free (unused) item */
+ * first free (unused) item
+ */
FORCEINLINE T *MakeFreeSpace(size_t num_items)
{
return (T*)base::Prepare(num_items * type_size);
diff --git a/src/misc/fixedsizearray.hpp b/src/misc/fixedsizearray.hpp
index 404db8184..c84938438 100644
--- a/src/misc/fixedsizearray.hpp
+++ b/src/misc/fixedsizearray.hpp
@@ -18,7 +18,8 @@
* fixed size array
* Upon construction it preallocates fixed size block of memory
* for all items, but doesn't construct them. Item's construction
- * is delayed. */
+ * is delayed.
+ */
template <class T, uint C>
struct FixedSizeArray {
protected:
@@ -35,7 +36,8 @@ protected:
/**
* the only member of fixed size array is pointer to the block
- * of C array of items. Header can be found on the offset -sizeof(ArrayHeader). */
+ * of C array of items. Header can be found on the offset -sizeof(ArrayHeader).
+ */
T *data;
/** return reference to the array header (non-const) */
diff --git a/src/misc/hashtable.hpp b/src/misc/hashtable.hpp
index 8dd1310a7..cafd6d7a9 100644
--- a/src/misc/hashtable.hpp
+++ b/src/misc/hashtable.hpp
@@ -139,7 +139,8 @@ public:
protected:
/**
* each slot contains pointer to the first item in the list,
- * Titem contains pointer to the next item - GetHashNext(), SetHashNext() */
+ * Titem contains pointer to the next item - GetHashNext(), SetHashNext()
+ */
typedef CHashTableSlotT<Titem_> Slot;
Slot *m_slots; // here we store our data (array of blobs)