summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryexo <yexo@openttd.org>2010-03-19 20:44:23 +0000
committeryexo <yexo@openttd.org>2010-03-19 20:44:23 +0000
commitea58a697c1ba032292e3d15f559fc567cc459434 (patch)
tree84a422abf9c127ba4ff89ed9b0dafe349df416b2
parentaaa8fc7a4c890c5fb04c8d4d97e8846cebe398b9 (diff)
downloadopenttd-ea58a697c1ba032292e3d15f559fc567cc459434.tar.xz
(svn r19474) -Cleanup: remove ByteBlob::Append(T*, num_items)
-rw-r--r--src/misc/blob.hpp11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/misc/blob.hpp b/src/misc/blob.hpp
index 264366b40..ed8c52ac6 100644
--- a/src/misc/blob.hpp
+++ b/src/misc/blob.hpp
@@ -350,6 +350,7 @@ public:
{
return (base::Capacity() / type_size);
}
+
/** Return number of additional items that can fit in the Blob without buffer reallocation */
FORCEINLINE uint GetReserve() const
{
@@ -362,16 +363,6 @@ public:
return (T*)base::Append(num_items * type_size);
}
- /** Add given items (ptr + number of items) at the end of blob */
- FORCEINLINE T *Append(const T *pSrc, uint num_items)
- {
- T *pDst = GrowSizeNC(num_items);
- T *pDstOrg = pDst;
- T *pDstEnd = pDst + num_items;
- while (pDst < pDstEnd) new (pDst++) T(*(pSrc++));
- return pDstOrg;
- }
-
/** 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(uint num_items)