Skip to content

Commit

Permalink
feat: EntityBuilder::is_empty
Browse files Browse the repository at this point in the history
  • Loading branch information
ten3roberts committed Feb 11, 2024
1 parent 7538cfb commit b9e93f7
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/entity/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,13 @@ impl EntityBuilder {
pub fn component_count(&self) -> usize {
self.buffer.len()
}

/// Returns true if the builder does not contain any components
#[must_use]
#[inline]
pub fn is_empty(&self) -> bool {
self.buffer.is_empty()
}
}

impl Default for EntityBuilder {
Expand Down

0 comments on commit b9e93f7

Please sign in to comment.