Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Methods on Entity should be const #6548

Closed
alice-i-cecile opened this issue Nov 11, 2022 · 1 comment
Closed

Methods on Entity should be const #6548

alice-i-cecile opened this issue Nov 11, 2022 · 1 comment
Labels
A-ECS Entities, components, systems, and events C-Testing A change that impacts how we test Bevy or how users test their apps C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy

Comments

@alice-i-cecile
Copy link
Member

These methods are useful for tests, but are not const.

This makes it harder to create dummy entities to use to populate data structures.

@alice-i-cecile alice-i-cecile added D-Trivial Nice and easy! A great choice to get started with Bevy A-ECS Entities, components, systems, and events C-Usability A targeted quality-of-life change that makes Bevy easier to use C-Testing A change that impacts how we test Bevy or how users test their apps labels Nov 11, 2022
@james7132
Copy link
Member

This seems to be a duplicate of #5687, which was resolved in #5688, but Entity::to_bits was the only remaining method that wasn't changed to be const.

@bors bors bot closed this as completed in 2179a3e Nov 12, 2022
ItsDoot pushed a commit to ItsDoot/bevy that referenced this issue Feb 1, 2023
# Objective
Fix bevyengine#6548. Most of these methods were already made `const` in bevyengine#5688. `Entity::to_bits` is the only one that remained.

## Solution
Make it const.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-ECS Entities, components, systems, and events C-Testing A change that impacts how we test Bevy or how users test their apps C-Usability A targeted quality-of-life change that makes Bevy easier to use D-Trivial Nice and easy! A great choice to get started with Bevy
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants