-
-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add len, is_empty, iter method on SparseSets, make SparseSets inspect… (
#7638) …able like Table. Rename clear to clear_entities to clarify that metadata keeps, only value cleared # Objective - Provide some inspectability for SparseSets. ## Solution - `Tables` has these three methods, len, is_empty and iter too. Add these methods to `SparseSets`, so user can print the shape of storage. --- ## Changelog > This section is optional. If this was a trivial fix, or has no externally-visible impact, you can delete this section. - Add `len`, `is_empty`, `iter` methods on SparseSets. - Rename `clear` to `clear_entities` to clarify its purpose. - Add `new_for_test` on `ComponentInfo` to make test code easy. - Add test case covering new methods. ## Migration Guide > This section is optional. If there are no breaking changes, you can delete this section. - Simply adding new functionality is not a breaking change.
- Loading branch information
Showing
4 changed files
with
83 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters