summaryrefslogtreecommitdiff
path: root/src/core/smallvec_type.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/core/smallvec_type.hpp
parent4d5dbf51707c42c24eeafdb65016b079c54adcf2 (diff)
downloadopenttd-fb5ecb94992e7febf4bc059cb6ec4a51f50c66b0.tar.xz
(svn r22411) -Document: another bunch of bits
Diffstat (limited to 'src/core/smallvec_type.hpp')
-rw-r--r--src/core/smallvec_type.hpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp
index 8116ca2ea..00fb7c5a0 100644
--- a/src/core/smallvec_type.hpp
+++ b/src/core/smallvec_type.hpp
@@ -35,12 +35,20 @@ protected:
public:
SmallVector() : data(NULL), items(0), capacity(0) { }
+ /**
+ * Copy constructor.
+ * @param other The other vector to copy.
+ */
template <uint X>
SmallVector(const SmallVector<T, X> &other) : data(NULL), items(0), capacity(0)
{
MemCpyT<T>(this->Append(other.Length()), other.Begin(), other.Length());
}
+ /**
+ * Assignment.
+ * @param other The new vector that.
+ */
template <uint X>
SmallVector &operator=(const SmallVector<T, X> &other)
{
@@ -318,6 +326,6 @@ public:
}
};
-typedef AutoFreeSmallVector<char*, 4> StringList;
+typedef AutoFreeSmallVector<char*, 4> StringList; ///< Type for a list of strings.
#endif /* SMALLVEC_TYPE_HPP */