Add EraseIf() api to OwnerContainer for proper implementaion of Erase-Remove idiom. 87/252387/2
authorSubhransu Mohanty <sub.mohanty@samsung.com>
Wed, 27 Jan 2021 09:20:24 +0000 (18:20 +0900)
committerSubhransu Mohanty <sub.mohanty@samsung.com>
Wed, 27 Jan 2021 09:25:44 +0000 (18:25 +0900)
commit859edf3e000ac4d47afb6ae7a8556f35c8f0fcad
tree2a49edb7bfdbcbb9aaeff04b576c30ea986f4de9
parent38a141a5bf06698b644b6228e6a71b4216693fb7
Add EraseIf() api to OwnerContainer for proper implementaion of Erase-Remove idiom.

std::remove_if() moves the end object to the removed object position.
as OwnerContainer keeps the raw pointer, have introduced a higher order function
which will free the object if predicate returns true.

Change-Id: I0e69fee7ef115d9e15cc36e8cbe6889b3ad77c4d
dali/devel-api/common/owner-container.h
dali/internal/update/animation/scene-graph-animation.cpp