From a19584a4715444721f8f625f0b5481e67c0d97ae Mon Sep 17 00:00:00 2001 From: Jacques Lucke Date: Mon, 13 Jul 2020 10:51:46 +0200 Subject: BLI: fix constructor regression for Vector and Array This was introduced in rB403384998a6bb5f428e15ced5. --- source/blender/blenlib/BLI_array.hh | 4 ++++ source/blender/blenlib/BLI_vector.hh | 4 ++++ 2 files changed, 8 insertions(+) (limited to 'source/blender') diff --git a/source/blender/blenlib/BLI_array.hh b/source/blender/blenlib/BLI_array.hh index c7a9c49c972..c411fc50f15 100644 --- a/source/blender/blenlib/BLI_array.hh +++ b/source/blender/blenlib/BLI_array.hh @@ -105,6 +105,10 @@ class Array { { } + Array(const std::initializer_list &values) : Array(Span(values)) + { + } + /** * Create a new array with the given size. All values will be default constructed. For trivial * types like int, default construction does nothing. diff --git a/source/blender/blenlib/BLI_vector.hh b/source/blender/blenlib/BLI_vector.hh index df885588d9b..1fe38464ad0 100644 --- a/source/blender/blenlib/BLI_vector.hh +++ b/source/blender/blenlib/BLI_vector.hh @@ -167,6 +167,10 @@ class Vector { { } + Vector(const std::initializer_list &values) : Vector(Span(values)) + { + } + template> * = nullptr> -- cgit v1.2.3