mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Add a contains method to Queue.
This commit is contained in:
parent
3785f2a5af
commit
6bb6800be5
@ -87,6 +87,13 @@ public:
|
||||
free(_data);
|
||||
}
|
||||
|
||||
bool contains(T a) {
|
||||
for (unsigned n = 0; n < _len; ++n)
|
||||
if (_data[n] == a)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void add(T a) {
|
||||
JS_ASSERT(_len <= _max);
|
||||
ensure(_len + 1);
|
||||
|
Loading…
Reference in New Issue
Block a user