mirror of
https://github.com/Relintai/pandemonium_engine.git
synced 2024-12-23 20:36:53 +01:00
Added contains method to PoolVector.
This commit is contained in:
parent
361f949093
commit
d252ecd131
@ -441,6 +441,19 @@ public:
|
||||
return rs;
|
||||
}
|
||||
|
||||
bool contains(const T &val) const {
|
||||
Read r = read();
|
||||
int s = size();
|
||||
|
||||
for (int i = 0; i < s; ++s) {
|
||||
if (r[i] == val) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
bool is_locked() const { return alloc && alloc->lock.get() > 0; }
|
||||
|
||||
inline T operator[](int p_index) const;
|
||||
|
Loading…
Reference in New Issue
Block a user