Skip to content

Commit

Permalink
Fix warning in iter.hpp
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMertens committed Oct 14, 2024
1 parent aefab3b commit 7aa1196
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions distr/flecs.h
Original file line number Diff line number Diff line change
Expand Up @@ -22836,7 +22836,7 @@ struct iter {
* @param func Callback invoked for each target
*/
template <typename Func>
void targets(int index, const Func& func);
void targets(int8_t index, const Func& func);

/** Free iterator resources.
* This operation only needs to be called when the iterator is not iterated
Expand Down Expand Up @@ -32532,7 +32532,7 @@ inline flecs::entity iter::get_var(const char *name) const {
}

template <typename Func>
void iter::targets(int index, const Func& func) {
void iter::targets(int8_t index, const Func& func) {
ecs_assert(iter_->table != nullptr, ECS_INVALID_OPERATION, NULL);
ecs_assert(index < iter_->field_count, ECS_INVALID_PARAMETER, NULL);
ecs_assert(ecs_field_is_set(iter_, index), ECS_INVALID_PARAMETER, NULL);
Expand Down
2 changes: 1 addition & 1 deletion include/flecs/addons/cpp/impl/iter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ inline flecs::entity iter::get_var(const char *name) const {
}

template <typename Func>
void iter::targets(int index, const Func& func) {
void iter::targets(int8_t index, const Func& func) {
ecs_assert(iter_->table != nullptr, ECS_INVALID_OPERATION, NULL);
ecs_assert(index < iter_->field_count, ECS_INVALID_PARAMETER, NULL);
ecs_assert(ecs_field_is_set(iter_, index), ECS_INVALID_PARAMETER, NULL);
Expand Down
2 changes: 1 addition & 1 deletion include/flecs/addons/cpp/iter.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ struct iter {
* @param func Callback invoked for each target
*/
template <typename Func>
void targets(int index, const Func& func);
void targets(int8_t index, const Func& func);

/** Free iterator resources.
* This operation only needs to be called when the iterator is not iterated
Expand Down

0 comments on commit 7aa1196

Please sign in to comment.