This commit is contained in:
Ricardo Luís Vaz Silva 2024-02-13 17:47:23 -03:00 committed by Rachael Alexanderson
parent cc51b486e0
commit 3348822390

View file

@ -576,6 +576,35 @@ public:
return f;
}
bool SortedDelete(const T& obj)
{
auto f = SortedFind(obj, true);
if (f == Size())
{
Delete(f);
return true;
}
else
{
return false;
}
}
template<typename Func>
bool SortedDelete(const T& obj, Func lt)
{
auto f = SortedFind(obj, lt, true);
if (f == Size())
{
Delete(f);
return true;
}
else
{
return false;
}
}
bool Pop ()
{
if (Count > 0)