Code: Select all

```
bool operator < ( const GameEntity *_r ) const
{
return mId < _r->mId;
}
```

Code: Select all

```
GameEntityVec::iterator itor = std::lower_bound( mGameEntities[toRemove->mType].begin(),
mGameEntities[toRemove->mType].end(),
toRemove );
```

I suggest removing the deceptive overloaded operator < and replacing it with this function:

Code: Select all

```
static bool Compare(const GameEntity *_l, const GameEntity *_r)
{
return _l->mId < _r->mId;
}
```

Code: Select all

```
GameEntityVec::iterator itor = std::lower_bound( mGameEntities[toRemove->mType].begin(),
mGameEntities[toRemove->mType].end(),
toRemove,
GameEntity::Compare);
```