Unrevert two changes

* Sorted Delete for TArray
* Typed constructor for TObjPtr
This commit is contained in:
Ricardo Luís Vaz Silva 2024-03-15 17:19:02 -03:00
commit cc88dfbe50
2 changed files with 32 additions and 0 deletions

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)