From f95b9f0ac942fd0106e1e1fdb01f02ae6c4178b1 Mon Sep 17 00:00:00 2001 From: Michele Caini Date: Thu, 25 Jan 2024 09:38:39 +0100 Subject: [PATCH] test: suppress clang missing-braces warnings --- test/entt/entity/group.cpp | 20 ++++++++------------ 1 file changed, 8 insertions(+), 12 deletions(-) diff --git a/test/entt/entity/group.cpp b/test/entt/entity/group.cpp index 5aa014ecc..9623b7144 100644 --- a/test/entt/entity/group.cpp +++ b/test/entt/entity/group.cpp @@ -979,10 +979,9 @@ TEST(OwningGroup, Each) { TEST(OwningGroup, SortOrdered) { entt::registry registry; auto group = registry.group(); - constexpr auto number_of_entities = 5u; - std::array entity{}; - const std::array value{16, 8, 4, 1, 2}; + const std::array value{test::boxed_int{16}, test::boxed_int{8}, test::boxed_int{4}, test::boxed_int{1}, test::boxed_int{2}}; + std::array entity{}; const std::array other{'a', 'b', 'c'}; registry.create(entity.begin(), entity.end()); @@ -1020,10 +1019,9 @@ TEST(OwningGroup, SortOrdered) { TEST(OwningGroup, SortReverse) { entt::registry registry; auto group = registry.group(); - constexpr auto number_of_entities = 5u; - std::array entity{}; - const std::array value{4, 8, 16, 1, 2}; + const std::array value{test::boxed_int{4}, test::boxed_int{8}, test::boxed_int{16}, test::boxed_int{1}, test::boxed_int{2}}; + std::array entity{}; const std::array other{'a', 'b', 'c'}; registry.create(entity.begin(), entity.end()); @@ -1061,10 +1059,9 @@ TEST(OwningGroup, SortReverse) { TEST(OwningGroup, SortUnordered) { entt::registry registry; auto group = registry.group(entt::get); - constexpr auto number_of_entities = 7u; - std::array entity{}; - const std::array value{16, 2, 1, 32, 64, 4, 8}; + const std::array value{test::boxed_int{16}, test::boxed_int{2}, test::boxed_int{1}, test::boxed_int{32}, test::boxed_int{64}, test::boxed_int{4}, test::boxed_int{8}}; + std::array entity{}; const std::array other{'c', 'b', 'a', 'd', 'e'}; registry.create(entity.begin(), entity.end()); @@ -1106,10 +1103,9 @@ TEST(OwningGroup, SortUnordered) { TEST(OwningGroup, SortWithExclusionList) { entt::registry registry; auto group = registry.group(entt::get<>, entt::exclude); - constexpr auto number_of_entities = 5u; - std::array entity{}; - const std::array value{1, 2, 4, 8, 16}; + const std::array value{test::boxed_int{1}, test::boxed_int{2}, test::boxed_int{4}, test::boxed_int{8}, test::boxed_int{16}}; + std::array entity{}; registry.create(entity.begin(), entity.end()); registry.insert(entity.begin(), entity.end(), value.begin());