Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
RicardoLuis0 authored and madame-rachelle committed Mar 5, 2024
1 parent cc51b48 commit 3348822
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions src/common/utility/tarray.h
Expand Up @@ -576,6 +576,35 @@ class TArray
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)
Expand Down

0 comments on commit 3348822

Please sign in to comment.