Przeglądaj źródła

algorithm: linter directive

Michele Caini 1 rok temu
rodzic
commit
836847b2a7
1 zmienionych plików z 4 dodań i 1 usunięć
  1. 4 1
      src/entt/core/algorithm.hpp

+ 4 - 1
src/entt/core/algorithm.hpp

@@ -104,13 +104,16 @@ struct radix_sort {
                 constexpr auto mask = (1 << Bit) - 1;
                 constexpr auto buckets = 1 << Bit;
 
-                std::size_t index[buckets]{};
+                // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
                 std::size_t count[buckets]{};
 
                 for(auto it = from; it != to; ++it) {
                     ++count[(getter(*it) >> start) & mask];
                 }
 
+                // NOLINTNEXTLINE(cppcoreguidelines-avoid-c-arrays, modernize-avoid-c-arrays)
+                std::size_t index[buckets]{};
+
                 for(std::size_t pos{}, end = buckets - 1u; pos < end; ++pos) {
                     index[pos + 1u] = index[pos] + count[pos];
                 }