Skip to content

Commit 63e8344

Browse files
committed
Added empty util fn
1 parent 96bf3d9 commit 63e8344

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

ecsact/runtime/core.hh

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,17 @@ public:
6969
);
7070
}
7171

72+
/**
73+
* @returns `true` when all lengths are `0`
74+
*/
75+
inline auto empty() const noexcept -> bool {
76+
return //
77+
_c_exec_opts.actions_length == 0 &&
78+
_c_exec_opts.add_components_length == 0 &&
79+
_c_exec_opts.update_components_length == 0 &&
80+
_c_exec_opts.remove_components_length == 0;
81+
}
82+
7283
#ifdef __cpp_lib_ranges_zip
7384
inline auto add_components_zip() {
7485
return std::views::zip(add_components_entities(), add_components());

0 commit comments

Comments
 (0)