summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-03-04 20:49:33 +0000
committerPeterN <peter@fuzzle.org>2019-03-26 20:15:57 +0000
commitcc62f4163f230ed82ef3b04187987d3e380cd570 (patch)
treec4e271f72ae231d9934f215624054d605665ca6c /src/core
parentc01a2e2a81d8e7bcd47d46292ed0b7d452081c31 (diff)
downloadopenttd-cc62f4163f230ed82ef3b04187987d3e380cd570.tar.xz
Cleanup: Remove unused size template parameters from SmallMap and Auto[Free|Delete]SmallVector
Diffstat (limited to 'src/core')
-rw-r--r--src/core/smallmap_type.hpp2
-rw-r--r--src/core/smallvec_type.hpp8
2 files changed, 4 insertions, 6 deletions
diff --git a/src/core/smallmap_type.hpp b/src/core/smallmap_type.hpp
index debd4165e..d7a9a3832 100644
--- a/src/core/smallmap_type.hpp
+++ b/src/core/smallmap_type.hpp
@@ -39,7 +39,7 @@ struct SmallPair {
*
* @see SmallVector
*/
-template <typename T, typename U, uint S = 16>
+template <typename T, typename U>
struct SmallMap : std::vector<SmallPair<T, U> > {
typedef ::SmallPair<T, U> Pair;
typedef Pair *iterator;
diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp
index 19dab2228..e71edf89f 100644
--- a/src/core/smallvec_type.hpp
+++ b/src/core/smallvec_type.hpp
@@ -77,9 +77,8 @@ T* grow(std::vector<T>& vec, std::size_t num)
* inside the list.
*
* @param T The type of the items stored, must be a pointer
- * @param S The steps of allocation
*/
-template <typename T, uint S>
+template <typename T>
class AutoFreeSmallVector : public std::vector<T> {
public:
~AutoFreeSmallVector()
@@ -108,9 +107,8 @@ public:
* inside the list.
*
* @param T The type of the items stored, must be a pointer
- * @param S The steps of allocation
*/
-template <typename T, uint S>
+template <typename T>
class AutoDeleteSmallVector : public std::vector<T> {
public:
~AutoDeleteSmallVector()
@@ -131,6 +129,6 @@ public:
}
};
-typedef AutoFreeSmallVector<char*, 4> StringList; ///< Type for a list of strings.
+typedef AutoFreeSmallVector<char*> StringList; ///< Type for a list of strings.
#endif /* SMALLVEC_TYPE_HPP */