runtime_view doesn't use sparse_set<...>::data() anymore

This commit is contained in:
Michele Caini
2019-08-26 00:03:37 +02:00
parent 34af44b8d3
commit 5fe5d4b6fc

View File

@@ -242,7 +242,7 @@ public:
*/
bool contains(const entity_type entt) const ENTT_NOEXCEPT {
return valid() && std::all_of(pools.cbegin(), pools.cend(), [entt](const auto *view) {
return view->has(entt) && view->data()[view->get(entt)] == entt;
return view->find(entt) != view->end();
});
}