diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2022-07-25 15:32:52 +0200 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2022-07-27 09:34:07 +0200 |
commit | b9d360405a26ec976e443d501757ad806ffdcd6b (patch) | |
tree | a899632eb25ec51cc0c954e225ddcec7a2970c40 /include | |
parent | ecef3edbcd61a80c1c65982a1ac71b23e06d3d54 (diff) |
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.grandin@collabora.co.uk>
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/o3tl/enumarray.hxx | 5 |
1 files changed, 3 insertions, 2 deletions
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; }; |