diff options
author | Colin Basnett <cmbasnett@gmail.com> | 2022-09-17 03:50:37 +0300 |
---|---|---|
committer | Colin Basnett <cmbasnett@gmail.com> | 2022-09-17 03:50:37 +0300 |
commit | 564bda241a973396da51d7c3ccd9efd97d51728a (patch) | |
tree | 4d9aa4cccd82e2e606b47774afa5e1015bf14768 /source/blender/blenlib/BLI_vector.hh | |
parent | 0fff238150d076576053c25b646f653d6e3b0edb (diff) | |
parent | 48d7ff68f0df209c77bbb081ab46fbc109fd825a (diff) |
Merge branch 'master' into feature-imformatfeature-imformat
Diffstat (limited to 'source/blender/blenlib/BLI_vector.hh')
-rw-r--r-- | source/blender/blenlib/BLI_vector.hh | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/source/blender/blenlib/BLI_vector.hh b/source/blender/blenlib/BLI_vector.hh index c23d846d277..1f5f97d754d 100644 --- a/source/blender/blenlib/BLI_vector.hh +++ b/source/blender/blenlib/BLI_vector.hh @@ -451,8 +451,16 @@ class Vector { */ int64_t append_and_get_index(const T &value) { + return this->append_and_get_index_as(value); + } + int64_t append_and_get_index(T &&value) + { + return this->append_and_get_index_as(std::move(value)); + } + template<typename... ForwardValue> int64_t append_and_get_index_as(ForwardValue &&...value) + { const int64_t index = this->size(); - this->append(value); + this->append_as(std::forward<ForwardValue>(value)...); return index; } |