suppress shadow warnings

This commit is contained in:
Michele Caini
2020-02-08 16:31:01 +01:00
parent 3aef00af18
commit db8d9ebc72
2 changed files with 4 additions and 4 deletions

View File

@@ -180,10 +180,10 @@ class basic_view<Entity, exclude_t<Exclude...>, Component...> {
template<typename Comp, typename Func, typename... Other, typename... Type>
void traverse(Func func, type_list<Other...>, type_list<Type...>) const {
if constexpr(std::disjunction_v<std::is_same<Comp, Type>...>) {
auto raw = std::get<pool_type<Comp> *>(pools)->begin();
auto it = std::get<pool_type<Comp> *>(pools)->begin();
for(const auto entt: static_cast<const sparse_set<entity_type> &>(*std::get<pool_type<Comp> *>(pools))) {
auto curr = raw++;
auto curr = it++;
if((std::get<pool_type<Other> *>(pools)->has(entt) && ...) && (!std::get<pool_type<Exclude> *>(pools)->has(entt) && ...)) {
if constexpr(std::is_invocable_v<Func, decltype(get<Type>({}))...>) {

View File

@@ -12,8 +12,8 @@
struct empty_type {};
struct non_default_constructible {
non_default_constructible(int i): i{i} {}
int i;
non_default_constructible(int v): value{v} {}
int value;
};
struct listener {