1
0
Эх сурвалжийг харах

view_pack: suppress a shadow warning caused by an unused variable

Michele Caini 5 жил өмнө
parent
commit
7df0449100

+ 1 - 1
src/entt/entity/view_pack.hpp

@@ -244,7 +244,7 @@ public:
                 if constexpr(is_applicable_v<Func, decltype(std::tuple_cat(value, std::get<Other>(pack).get(entity)...))>) {
                 if constexpr(is_applicable_v<Func, decltype(std::tuple_cat(value, std::get<Other>(pack).get(entity)...))>) {
                     std::apply(func, std::tuple_cat(value, std::get<Other>(pack).get(entity)...));
                     std::apply(func, std::tuple_cat(value, std::get<Other>(pack).get(entity)...));
                 } else {
                 } else {
-                    const auto args = std::apply([](const auto entity, auto &&... component) { return std::forward_as_tuple(component...); }, value);
+                    const auto args = std::apply([](const auto, auto &&... component) { return std::forward_as_tuple(component...); }, value);
                     std::apply(func, std::tuple_cat(args, std::get<Other>(pack).get(entity)...));
                     std::apply(func, std::tuple_cat(args, std::get<Other>(pack).get(entity)...));
                 }
                 }
             }
             }