Skip to content

Commit 65303ff

Browse files
committed
update to entt v3.11.0
1 parent 6e68375 commit 65303ff

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

README.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# imgui_entt_entity_editor
22
A drop-in, single-file entity editor for EnTT, with ImGui as graphical backend.
3+
Originally developed for [MushMachine](https://github.com/MadeOfJelly/MushMachine).
34

45
[demo-code](https://github.com/Green-Sky/imgui_entt_entity_editor_demo) [(live)](https://green-sky.github.io/imgui_entt_entity_editor_demo/)
56

@@ -51,8 +52,8 @@ editor.registerComponent<Velocity>("Velocity");
5152
```
5253
5354
# Dependencies
54-
The editor uses EnTTv3.10.0 and ImGui. (tested with ImGui 1.68, 1.72b, 1.75, 1.78, 1.82, 1.85, 1.87)
55+
The editor uses EnTTv3.11.0 and ImGui. (tested with ImGui 1.68, 1.72b, 1.75, 1.78, 1.82, 1.85, 1.87)
5556
To use it with EnTTv3.0.0, use the dedicated branch.
5657
For specific EnTT version check the tags, if a new EnTT version does not require a update, I won't make a new Release.
57-
Releases available for EnTT 3.1.0, 3.1.1, 3.2.0, 3.2.1, 3.2.2, 3.3.x, 3.4.0, 3.6.0-3.8.1, 3.9.0, 3.10.0.
58+
Releases available for EnTT 3.1.0, 3.1.1, 3.2.0, 3.2.1, 3.2.2, 3.3.x, 3.4.0, 3.6.0-3.8.1, 3.9.0, 3.10.0, 3.11.0.
5859

imgui_entt_entity_editor.hpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,8 +85,8 @@ class EntityEditor {
8585

8686
bool entityHasComponent(Registry& registry, EntityType& entity, ComponentTypeID type_id)
8787
{
88-
const auto storage_it = registry.storage(type_id);
89-
return storage_it != registry.storage().end() && storage_it->second.contains(entity);
88+
const auto* storage_ptr = registry.storage(type_id);
89+
return storage_ptr != nullptr && storage_ptr->contains(entity);
9090
}
9191

9292
public:
@@ -243,11 +243,11 @@ class EntityEditor {
243243
}
244244
});
245245
} else {
246-
entt::basic_runtime_view<entt::basic_sparse_set<EntityType>> view{};
246+
entt::runtime_view view{};
247247
for (const auto type : comp_list) {
248-
auto storage_it = registry.storage(type);
249-
if (storage_it != registry.storage().end()) {
250-
view.iterate(registry.storage(type)->second);
248+
auto* storage_ptr = registry.storage(type);
249+
if (storage_ptr != nullptr) {
250+
view.iterate(*storage_ptr);
251251
}
252252
}
253253

0 commit comments

Comments
 (0)