mirror of
https://github.com/ZDoom/gzdoom.git
synced 2025-04-02 16:01:12 +00:00
...
This commit is contained in:
parent
cc51b486e0
commit
3348822390
1 changed files with 29 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue