made the search straightforward
This commit is contained in:
parent
7465f5e604
commit
a9bad6b8f9
@ -533,12 +533,14 @@ void BasicLibs::Insert( BasicLibInfo* LibInfo )
|
|||||||
|
|
||||||
BasicLibInfo* BasicLibs::Remove( BasicLibInfo* LibInfo )
|
BasicLibInfo* BasicLibs::Remove( BasicLibInfo* LibInfo )
|
||||||
{
|
{
|
||||||
size_t i = GetPos( LibInfo );
|
vector< BasicLibInfo* >::iterator it, eit = aList.end();
|
||||||
if ( i < aList.size() )
|
for (it = aList.begin(); it != eit; ++it)
|
||||||
{
|
{
|
||||||
vector< BasicLibInfo* >::iterator it = aList.begin();
|
if (*it == LibInfo)
|
||||||
advance( it , i );
|
{
|
||||||
it = aList.erase( it );
|
aList.erase(it);
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return LibInfo;
|
return LibInfo;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user