Removed errors when List::erase() can't find the value

This change makes the behavior consistent when the value
is not found between erasing from an empty list
(no error, just returning false) and erasing from a non-empty list
(previously displaying triggering an error and returning false).

Error message previously triggered:
ERROR: erase: Condition ' !p_I ' is true. returned: false
   At: ./core/list.h:157.
This commit is contained in:
PouleyKetchoupp 2019-11-30 20:20:01 +01:00
parent 719609522a
commit 45445e1b31

View file

@ -348,7 +348,7 @@ public:
* erase an element in the list, by iterator pointing to it. Return true if it was found/erased.
*/
bool erase(const Element *p_I) {
if (_data) {
if (_data && p_I) {
bool ret = _data->erase(p_I);
if (_data->size_cache == 0) {