basic_continuous_loader: deprecated ::has, use ::contains instead

This commit is contained in:
Michele Caini
2020-04-07 00:00:57 +02:00
parent a6aad25117
commit a7faab53b9
2 changed files with 7 additions and 2 deletions

1
TODO
View File

@@ -17,7 +17,6 @@
- get -> all, exclude -> none
Next:
* has -> contains and destroy -> erase for containers (sparse_set, storage, observer, snapshot)?
* meta, make it possible to reset nodes from meta types
* replace observer class with observer functions
* get(cmp, entity) -> void *, set(cmp, entity, void *)

View File

@@ -573,10 +573,16 @@ public:
* @param entt An entity identifier.
* @return True if `entity` is managed by the loader, false otherwise.
*/
bool has(entity_type entt) const ENTT_NOEXCEPT {
bool contains(entity_type entt) const ENTT_NOEXCEPT {
return (remloc.find(entt) != remloc.cend());
}
/*! @copydoc contains */
[[deprecated("use ::contains instead")]]
bool has(entity_type entt) const ENTT_NOEXCEPT {
return contains(entt);
}
/**
* @brief Returns the identifier to which an entity refers.
* @param entt An entity identifier.