From 1e90bee7ad193144dfd1e7303cab4e75ac7ee984 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Mon, 20 May 2024 13:15:26 +0200 Subject: [PATCH] algorithm: avoid C-arrays --- src/entt/core/algorithm.hpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/entt/core/algorithm.hpp b/src/entt/core/algorithm.hpp index 55251231f..0897f34a3 100644 --- a/src/entt/core/algorithm.hpp +++ b/src/entt/core/algorithm.hpp @@ -2,6 +2,7 @@ #define ENTT_CORE_ALGORITHM_HPP #include +#include #include #include #include @@ -104,8 +105,8 @@ struct radix_sort { constexpr auto mask = (1 << Bit) - 1; constexpr auto buckets = 1 << Bit; - std::size_t index[buckets]{}; - std::size_t count[buckets]{}; + std::array index{}; + std::array count{}; for(auto it = from; it != to; ++it) { ++count[(getter(*it) >> start) & mask];