diff --git a/test/entt/entity/group.cpp b/test/entt/entity/group.cpp index a46e4f1cb..080781696 100644 --- a/test/entt/entity/group.cpp +++ b/test/entt/entity/group.cpp @@ -193,7 +193,7 @@ TEST(NonOwningGroup, Each) { cgroup.each([&cnt](const int &, const char &) { --cnt; }); cgroup.each([&cnt](auto, const int &, const char &) { --cnt; }); - for(auto &&[entt, iv, cv]: group.each()) { + for(auto [entt, iv, cv]: group.each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -353,7 +353,7 @@ TEST(NonOwningGroup, ConstNonConstAndAllInBetween) { static_assert(std::is_same_v); }); - for(auto &&[entt, iv, cv]: group.each()) { + for(auto [entt, iv, cv]: group.each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -475,7 +475,7 @@ TEST(NonOwningGroup, EmptyAndNonEmptyTypes) { ASSERT_TRUE(entity == e0 || entity == e1); }); - for(auto &&[entt, iv]: group.each()) { + for(auto [entt, iv]: group.each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); ASSERT_TRUE(entt == e0 || entt == e1); @@ -514,7 +514,7 @@ TEST(NonOwningGroup, EmptyTypes) { ASSERT_EQ(entity, entt); }); - for(auto &&[entt, iv, cv]: registry.group(entt::get).each()) { + for(auto [entt, iv, cv]: registry.group(entt::get).each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -526,7 +526,7 @@ TEST(NonOwningGroup, EmptyTypes) { check = false; }); - for(auto &&[entt, iv, cv]: registry.group(entt::get).each()) { + for(auto [entt, iv, cv]: registry.group(entt::get).each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -537,7 +537,7 @@ TEST(NonOwningGroup, EmptyTypes) { ASSERT_EQ(entity, entt); }); - for(auto &&[entt, iv, cv]: registry.group(entt::get).each()) { + for(auto [entt, iv, cv]: registry.group(entt::get).each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -762,7 +762,7 @@ TEST(OwningGroup, Each) { cgroup.each([&cnt](const int &, const char &) { --cnt; }); cgroup.each([&cnt](auto, const int &, const char &) { --cnt; }); - for(auto &&[entt, iv, cv]: group.each()) { + for(auto [entt, iv, cv]: group.each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -1024,7 +1024,7 @@ TEST(OwningGroup, ConstNonConstAndAllInBetween) { static_assert(std::is_same_v); }); - for(auto &&[entt, iv, cv, dv, fv]: group.each()) { + for(auto [entt, iv, cv, dv, fv]: group.each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -1148,7 +1148,7 @@ TEST(OwningGroup, EmptyAndNonEmptyTypes) { ASSERT_TRUE(entity == e0 || entity == e1); }); - for(auto &&[entt, iv]: group.each()) { + for(auto [entt, iv]: group.each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); ASSERT_TRUE(entt == e0 || entt == e1); @@ -1187,7 +1187,7 @@ TEST(OwningGroup, EmptyTypes) { ASSERT_EQ(entity, entt); }); - for(auto &&[entt, iv, cv]: registry.group(entt::get).each()) { + for(auto [entt, iv, cv]: registry.group(entt::get).each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -1199,7 +1199,7 @@ TEST(OwningGroup, EmptyTypes) { check = false; }); - for(auto &&[entt, cv, iv]: registry.group(entt::get).each()) { + for(auto [entt, cv, iv]: registry.group(entt::get).each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -1210,7 +1210,7 @@ TEST(OwningGroup, EmptyTypes) { ASSERT_EQ(entity, entt); }); - for(auto &&[entt, iv, cv]: registry.group(entt::get).each()) { + for(auto [entt, iv, cv]: registry.group(entt::get).each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); diff --git a/test/entt/entity/view.cpp b/test/entt/entity/view.cpp index 78e2a1421..4fef867c7 100644 --- a/test/entt/entity/view.cpp +++ b/test/entt/entity/view.cpp @@ -192,7 +192,7 @@ TEST(SingleComponentView, Each) { cview.each([&cnt](const int &) { --cnt; }); cview.each([&cnt](auto, const int &) { --cnt; }); - for(auto &&[entt, iv]: view.each()) { + for(auto [entt, iv]: view.each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); ASSERT_EQ(iv, --cnt); @@ -232,12 +232,12 @@ TEST(SingleComponentView, ConstNonConstAndAllInBetween) { static_assert(std::is_same_v); }); - for(auto &&[entt, iv]: view.each()) { + for(auto [entt, iv]: view.each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); } - for(auto &&[entt, iv]: cview.each()) { + for(auto [entt, iv]: cview.each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); } @@ -262,11 +262,11 @@ TEST(SingleComponentView, ConstNonConstAndAllInBetweenWithEmptyType) { static_assert(std::is_same_v>); static_assert(std::is_same_v>); - for(auto &&[entt]: view.each()) { + for(auto [entt]: view.each()) { static_assert(std::is_same_v); } - for(auto &&[entt]: cview.each()) { + for(auto [entt]: cview.each()) { static_assert(std::is_same_v); } } @@ -331,7 +331,7 @@ TEST(SingleComponentView, EmptyTypes) { check = false; }); - for(auto &&[entt]: registry.view().each()) { + for(auto [entt]: registry.view().each()) { static_assert(std::is_same_v); ASSERT_EQ(entity, entt); } @@ -345,7 +345,7 @@ TEST(SingleComponentView, EmptyTypes) { check = false; }); - for(auto &&[entt, iv]: registry.view().each()) { + for(auto [entt, iv]: registry.view().each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); ASSERT_EQ(entity, entt); @@ -578,7 +578,7 @@ TEST(MultiComponentView, Each) { cview.each([&cnt](const int &, const char &) { --cnt; }); cview.each([&cnt](auto, const int &, const char &) { --cnt; }); - for(auto &&[entt, iv, cv]: view.each()) { + for(auto [entt, iv, cv]: view.each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -685,7 +685,7 @@ TEST(MultiComponentView, ConstNonConstAndAllInBetween) { static_assert(std::is_same_v); }); - for(auto &&[entt, iv, cv]: view.each()) { + for(auto [entt, iv, cv]: view.each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -799,7 +799,7 @@ TEST(MultiComponentView, EmptyTypes) { ASSERT_EQ(entity, entt); }); - for(auto &&[entt, iv, cv]: registry.view().each()) { + for(auto [entt, iv, cv]: registry.view().each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -811,7 +811,7 @@ TEST(MultiComponentView, EmptyTypes) { check = false; }); - for(auto &&[entt, iv, cv]: registry.view().each()) { + for(auto [entt, iv, cv]: registry.view().each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -822,7 +822,7 @@ TEST(MultiComponentView, EmptyTypes) { ASSERT_EQ(entity, entt); }); - for(auto &&[entt, iv, cv]: registry.view().each()) { + for(auto [entt, iv, cv]: registry.view().each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -833,7 +833,7 @@ TEST(MultiComponentView, EmptyTypes) { ASSERT_EQ(entity, entt); }); - for(auto &&[entt, iv, cv]: registry.view().each()) { + for(auto [entt, iv, cv]: registry.view().each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -845,7 +845,7 @@ TEST(MultiComponentView, EmptyTypes) { check = false; }); - for(auto &&[entt, iv, cv]: registry.view().each()) { + for(auto [entt, iv, cv]: registry.view().each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -856,7 +856,7 @@ TEST(MultiComponentView, EmptyTypes) { ASSERT_EQ(entity, entt); }); - for(auto &&[entt, iv, cv, dv]: registry.view().each()) { + for(auto [entt, iv, cv, dv]: registry.view().each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); diff --git a/test/entt/entity/view_pack.cpp b/test/entt/entity/view_pack.cpp index 3f0cfe349..1d1c8ed9c 100644 --- a/test/entt/entity/view_pack.cpp +++ b/test/entt/entity/view_pack.cpp @@ -141,7 +141,7 @@ TEST(ViewPack, Each) { cpack.each([&cnt](const int &, const char &) { --cnt; }); cpack.each([&cnt](auto, const int &, const char &) { --cnt; }); - for(auto &&[entt, iv, cv]: pack.each()) { + for(auto [entt, iv, cv]: pack.each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v); @@ -198,7 +198,7 @@ TEST(ViewPack, ConstNonConstAndAllInBetween) { static_assert(std::is_same_v); }); - for(auto &&[entt, iv, cv]: pack.each()) { + for(auto [entt, iv, cv]: pack.each()) { static_assert(std::is_same_v); static_assert(std::is_same_v); static_assert(std::is_same_v);