Skip to content

Commit 38e1467

Browse files
committed
snpashot: review/cleanup orphans but keep it in place
1 parent c560226 commit 38e1467

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

TODO

-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ TODO (high prio):
1313
* resource cache: avoid using shared ptr with loader and the others
1414
* further optimize exclusion lists in multi type views (no existence check)
1515
* doc: bump entities
16-
* deprecate/drop snapshot orphans function, make it a general purpose one
1716
* view with entity storage: begin/end should return filtered iterators
1817
* update view doc: single vs multi type views are no longer a thing actually
1918
* meta container: add value type to resize

src/entt/entity/snapshot.hpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ namespace internal {
2525

2626
template<typename Registry>
2727
void orphans(Registry &registry) {
28-
auto view = registry.template view<typename Registry::entity_type>();
28+
auto &storage = registry.template storage<typename Registry::entity_type>();
2929

30-
for(auto entt: view) {
30+
for(auto entt: storage) {
3131
if(registry.orphan(entt)) {
32-
view.storage()->erase(entt);
32+
storage.erase(entt);
3333
}
3434
}
3535
}

0 commit comments

Comments
 (0)