snapshot: minor changes

This commit is contained in:
Michele Caini
2023-05-17 10:45:31 +02:00
parent 5e639996d6
commit d166c026f7

View File

@@ -106,11 +106,11 @@ public:
if constexpr(sizeof...(Component) == 1u) {
const auto view = reg->template view<const Component...>();
(component<Component>(archive, view.rbegin(), view.rend()), ...);
return *this;
} else {
(component<Component>(archive), ...);
return *this;
}
return *this;
}
/**
@@ -537,14 +537,11 @@ public:
* @return The local identifier if any, the null entity otherwise.
*/
[[nodiscard]] entity_type map(entity_type entt) const noexcept {
const auto it = remloc.find(entt);
entity_type other = null;
if(it != remloc.cend()) {
other = it->second.first;
if(const auto it = remloc.find(entt); it != remloc.cend()) {
return it->second.first;
}
return other;
return null;
}
private: