mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 11:40:44 +00:00
- Add Contains()
method to TArray
class, returning a true/false bool as appropriate.
This commit is contained in:
parent
968708a649
commit
20ea0acbec
1 changed files with 11 additions and 0 deletions
|
@ -292,6 +292,17 @@ public:
|
|||
return i;
|
||||
}
|
||||
|
||||
bool Contains(const T& item) const
|
||||
{
|
||||
unsigned int i;
|
||||
for(i = 0;i < Count;++i)
|
||||
{
|
||||
if(Array[i] == item)
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
template<class Func>
|
||||
unsigned int FindEx(Func compare) const
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue