summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorglx <glx@openttd.org>2019-05-03 18:17:58 +0200
committerCharles Pigott <charlespigott@googlemail.com>2019-05-04 19:50:53 +0100
commit26aa3b86233b5ed9c1d3bfe67e2826ca6ff48ca7 (patch)
tree07605b02aa8f61b694864b18750184dbfe8b518a
parent9184a62958815393db5a505cc3b3ca9ab6d3076e (diff)
downloadopenttd-26aa3b86233b5ed9c1d3bfe67e2826ca6ff48ca7.tar.xz
Remove: grow() helper function
-rw-r--r--src/core/smallvec_type.hpp17
1 files changed, 0 insertions, 17 deletions
diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp
index 11ceb3fa8..3cf33f8b7 100644
--- a/src/core/smallvec_type.hpp
+++ b/src/core/smallvec_type.hpp
@@ -52,21 +52,4 @@ int find_index(std::vector<T> const& vec, T const& item)
return -1;
}
-/**
- * Helper function to append N default-constructed elements and get a pointer to the first new element
- * Consider using std::back_inserter in new code
- *
- * @param vec A reference to the vector to be extended
- * @param num Number of elements to be default-constructed
- *
- * @return Pointer to the first new element
- */
-template <typename T>
-T* grow(std::vector<T>& vec, std::size_t num)
-{
- std::size_t const pos = vec.size();
- vec.resize(pos + num);
- return vec.data() + pos;
-}
-
#endif /* SMALLVEC_TYPE_HPP */