view: use get_as_tuple internally

This commit is contained in:
Michele Caini
2021-01-22 09:17:00 +01:00
parent fdde216f0e
commit cce52c673b

View File

@@ -854,11 +854,7 @@ public:
ENTT_ASSERT(contains(entt));
if constexpr(sizeof...(Comp) == 0) {
if constexpr(std::is_same_v<typename storage_type::storage_category, empty_storage_tag>) {
return std::make_tuple();
} else {
return std::forward_as_tuple(pool->get(entt));
}
return get_as_tuple(*pool, entt);
} else {
static_assert(std::is_same_v<Comp..., Component>, "Invalid component type");
return pool->get(entt);