made the search straightforward

This commit is contained in:
Takeshi Abe 2012-04-13 02:16:31 +09:00
parent 7465f5e604
commit a9bad6b8f9

View File

@ -533,12 +533,14 @@ void BasicLibs::Insert( BasicLibInfo* LibInfo )
BasicLibInfo* BasicLibs::Remove( BasicLibInfo* LibInfo )
{
size_t i = GetPos( LibInfo );
if ( i < aList.size() )
vector< BasicLibInfo* >::iterator it, eit = aList.end();
for (it = aList.begin(); it != eit; ++it)
{
vector< BasicLibInfo* >::iterator it = aList.begin();
advance( it , i );
it = aList.erase( it );
if (*it == LibInfo)
{
aList.erase(it);
break;
}
}
return LibInfo;
}