diff options
author | Henry Wilson <m3henry@googlemail.com> | 2019-03-03 15:20:29 +0000 |
---|---|---|
committer | PeterN <peter@fuzzle.org> | 2019-03-26 20:15:57 +0000 |
commit | 6570f7989f5c1fc5a1276505a8e6efce7838efd9 (patch) | |
tree | 25eea4b31d7275aca834662c7a9755c7ae0e7845 /src | |
parent | ab711e6942757d775c08c31a6c32d488feba1dba (diff) | |
download | openttd-6570f7989f5c1fc5a1276505a8e6efce7838efd9.tar.xz |
Codechange: Declare SmallVector as an alias for std::vector
Diffstat (limited to 'src')
-rw-r--r-- | src/core/smallvec_type.hpp | 39 |
1 files changed, 2 insertions, 37 deletions
diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp index 5ec07f2f0..6f86e11cc 100644 --- a/src/core/smallvec_type.hpp +++ b/src/core/smallvec_type.hpp @@ -45,45 +45,10 @@ inline bool include(std::vector<T>& vec, const T &item) * @tparam T The type of the items stored * @tparam S The steps of allocation */ -template <typename T, uint S> -class SmallVector : public std::vector<T> { -public: - SmallVector() = default; - - /** - * Copy constructor. - * @param other The other vector to copy. - */ - SmallVector(const SmallVector &other) = default; - /** - * Generic copy constructor. - * @param other The other vector to copy. - */ - template <uint X> - SmallVector(const SmallVector<T, X> &other) : std::vector<T>(other) - { - } - /** - * Assignment. - * @param other The other vector to assign. - */ - SmallVector &operator=(const SmallVector &other) = default; - - /** - * Generic assignment. - * @param other The other vector to assign. - */ - template <uint X> - SmallVector &operator=(const SmallVector<T, X> &other) - { - std::vector<T>::operator=(other); - return *this; - } - - ~SmallVector() = default; -}; +template <typename T, uint S> +using SmallVector = std::vector<T>; /** * Helper function to get the index of an item |