Added a new overloaded find function where the caller can set where to start searching
This commit is contained in:
parent
a6f7742e86
commit
fa7dc91449
@ -279,9 +279,10 @@ public:
|
||||
iterator iter = begin();
|
||||
while (iter) iter.remove();
|
||||
}
|
||||
iterator find(F desc)
|
||||
|
||||
iterator find(iterator startOn, const F &desc)
|
||||
{
|
||||
iterator iter = begin();
|
||||
iterator iter = startOn;
|
||||
while(iter)
|
||||
{
|
||||
if (*iter == desc)
|
||||
@ -291,6 +292,11 @@ public:
|
||||
return iter;
|
||||
}
|
||||
|
||||
iterator find(const F &desc)
|
||||
{
|
||||
return find(begin(), desc);
|
||||
}
|
||||
|
||||
int size()
|
||||
{
|
||||
iterator iter = begin();
|
||||
|
Loading…
Reference in New Issue
Block a user