registry: deprecate ::assign

This commit is contained in:
Michele Caini
2023-04-07 18:06:12 +02:00
parent 3caad4100d
commit 88bf26a2f8
2 changed files with 1 additions and 2 deletions

1
TODO
View File

@@ -18,7 +18,6 @@ TODO (high prio):
* pop_if to improve further destroying entities (drastically)
* doc: exclude only views, storage entity (and diff between iterator and each based iteration), bump entities, signals on entity creation/destruction
* registry: replace destroy with a drop-all method that doesn't care about validity
* registry: review assign mechanism, maybe it's worth to drop it
WIP:
* get rid of observers, storage based views made them pointless - document alternatives

View File

@@ -584,7 +584,7 @@ public:
* @param destroyed The number of released entities.
*/
template<typename It>
void assign(It first, It last, const size_type destroyed) {
[[deprecated("use .storage<Entity>().push(first, last) and .storage<Entity>().in_use(len) instead")]] void assign(It first, It last, const size_type destroyed) {
ENTT_ASSERT(!shortcut->in_use(), "Non-empty registry");
shortcut->push(first, last);
shortcut->in_use(shortcut->size() - destroyed);