mirror of
https://github.com/vcmi/vcmi.git
synced 2025-01-12 02:28:11 +02:00
Use upper_bound instead of sort since predicate does not fulfills strict weak ordering requirement for std::sort
This commit is contained in:
parent
98a54b61b7
commit
e2fe20e26d
@ -54,9 +54,8 @@ void MapRendererContextState::addObject(const CGObjectInstance * obj)
|
||||
if(LOCPLINT->cb->isInTheMap(currTile) && obj->coveringAt(currTile))
|
||||
{
|
||||
auto & container = objects[currTile.z][currTile.x][currTile.y];
|
||||
|
||||
container.push_back(obj->id);
|
||||
boost::range::sort(container, compareObjectBlitOrder);
|
||||
auto position = std::upper_bound(container.begin(), container.end(), obj->id, compareObjectBlitOrder);
|
||||
container.insert(position, obj->id);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user