diff --git a/tools/entt/davey/davey.hpp b/tools/entt/davey/davey.hpp index f81722120..2fd8b072c 100644 --- a/tools/entt/davey/davey.hpp +++ b/tools/entt/davey/davey.hpp @@ -115,16 +115,16 @@ static void present_element(const entt::meta_any &obj, OnEntity on_entity) { } } -template -static void present_entity(const meta_ctx &ctx, const entt::basic_registry ®istry, const Entity entt) { - for([[maybe_unused]] auto [id, storage]: registry.storage()) { - if(storage.contains(entt)) { +template +static void present_entity(const meta_ctx &ctx, const Entity entt, const It from, const It to) { + for(auto it = from; it != to; ++it) { + if(const auto &storage = it->second; storage.contains(entt)) { if(auto type = entt::resolve(ctx, storage.info()); type) { if(const davey_data *info = type.custom(); ImGui::TreeNode(&storage.info(), "%s", DAVEY_OR(storage))) { if(const auto obj = type.from_void(storage.value(entt)); obj) { - present_element(obj, [&ctx, ®istry](const char *name, const entt::entity other) { + present_element(obj, [&ctx, from, to](const char *name, const entt::entity other) { if(ImGui::TreeNode(name, "%s: %d [%d/%d]", name, entt::to_integral(other), entt::to_entity(other), entt::to_version(other))) { - present_entity(ctx, registry, other); + present_entity(ctx, other, from, to); ImGui::TreePop(); } }); @@ -182,7 +182,8 @@ void entity_tab(const meta_ctx &ctx, const entt::basic_registry(entt::to_entity(entt))); if(ImGui::TreeNode(&entt::type_id(), "%d [%d/%d]", entt::to_integral(entt), entt::to_entity(entt), entt::to_version(entt))) { - present_entity(ctx, registry, entt); + const auto range = registry.storage(); + present_entity(ctx, entt, range.begin(), range.end()); ImGui::TreePop(); }