diff options
author | m-stephen <truestyle2005@163.com> | 2019-07-25 10:40:26 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-25 10:40:26 +0800 |
commit | 73cbb0d01b2f899efb9515d00baeb62de9bde25e (patch) | |
tree | 9b08bab9c802813f390826d1ae0ecb90c88667d2 /src/mbgl/gfx/vertex_vector.hpp | |
parent | 1a68ceef69d8f23541ed4fa9ab380a51d6b8cce2 (diff) | |
parent | a8db681454e5173c03154e79c5f125ce26d653c1 (diff) | |
download | qtlocation-mapboxgl-upstream/stephen-MGLLoggingConfiguration.tar.gz |
Merge branch 'master' into stephen-MGLLoggingConfigurationupstream/stephen-MGLLoggingConfiguration
Diffstat (limited to 'src/mbgl/gfx/vertex_vector.hpp')
-rw-r--r-- | src/mbgl/gfx/vertex_vector.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mbgl/gfx/vertex_vector.hpp b/src/mbgl/gfx/vertex_vector.hpp index f41f842294..59fe67586b 100644 --- a/src/mbgl/gfx/vertex_vector.hpp +++ b/src/mbgl/gfx/vertex_vector.hpp @@ -11,11 +11,13 @@ template <class V> class VertexVector { public: using Vertex = V; + template<typename Arg> + void emplace_back(Arg&& vertex) { + v.emplace_back(std::forward<Arg>(vertex)); + } - template <class... Args> - void emplace_back(Args&&... args) { - static_assert(sizeof...(args) == 1, "wrong buffer element count"); - util::ignore({ (v.emplace_back(std::forward<Args>(args)), 0)... }); + void extend(std::size_t n, const Vertex& val) { + v.resize(v.size() + n, val); } std::size_t elements() const { |