include/o3tl/enumarray.hxx | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
New commits: commit b9d360405a26ec976e443d501757ad806ffdcd6b Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Mon Jul 25 15:32:52 2022 +0200 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Wed Jul 27 09:34:07 2022 +0200 o3tl: use std::array as the container for enumarray Change-Id: I482140a14a4f18014d89ed5b8ce7c3ca9447b8d6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/137465 Reviewed-by: Noel Grandin <noel.gran...@collabora.co.uk> Tested-by: Jenkins Reviewed-by: Tomaž Vajngerl <qui...@gmail.com> diff --git a/include/o3tl/enumarray.hxx b/include/o3tl/enumarray.hxx index 558ab158bffe..4fd5cab3155f 100644 --- a/include/o3tl/enumarray.hxx +++ b/include/o3tl/enumarray.hxx @@ -23,6 +23,7 @@ #include <iterator> #include <type_traits> #include <utility> +#include <array> #include <cassert> namespace o3tl { @@ -92,10 +93,10 @@ public: const_iterator begin() const { return const_iterator(*this, 0); } const_iterator end() const { return const_iterator(*this, size()); } - V* data() { return detail_values; } + V* data() { return detail_values.data(); } private: - V detail_values[max_index + 1]; + std::array<V, max_index + 1> detail_values; };