Skip to content

Commit

Permalink
#723 Add elem method to meta::cursor
Browse files Browse the repository at this point in the history
  • Loading branch information
SanderMertens committed Jun 30, 2022
1 parent d4ea49b commit 615d063
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions flecs.h
Original file line number Diff line number Diff line change
Expand Up @@ -14232,6 +14232,10 @@ struct cursor {
return ecs_meta_member(&m_cursor, name);
}

int elem(int32_t elem) {
return ecs_meta_elem(&m_cursor, elem);
}

bool is_collection() {
return ecs_meta_is_collection(&m_cursor);
}
Expand Down
4 changes: 4 additions & 0 deletions include/flecs/addons/cpp/mixins/meta/decl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ struct cursor {
return ecs_meta_member(&m_cursor, name);
}

int elem(int32_t elem) {
return ecs_meta_elem(&m_cursor, elem);
}

bool is_collection() {
return ecs_meta_is_collection(&m_cursor);
}
Expand Down
1 change: 0 additions & 1 deletion test/meta/src/Cursor.c
Original file line number Diff line number Diff line change
Expand Up @@ -2075,7 +2075,6 @@ void Cursor_array_move_out_of_range() {
}
});


T value = {0};

ecs_meta_cursor_t cur = ecs_meta_cursor(world, t, &value);
Expand Down

0 comments on commit 615d063

Please sign in to comment.