forked from mirror/OpenTTD
Codechange: Emplace std::pair into vectors.
This creates the pair in the vector, instead of creating it then copying it in.
This commit is contained in:
@@ -1545,7 +1545,7 @@ static void ViewportSortParentSprites(ParentSpriteToSortVector *psdv)
|
||||
|
||||
/* Initialize sprite list and order. */
|
||||
for (auto p = psdv->rbegin(); p != psdv->rend(); p++) {
|
||||
sprite_list.push_front(std::make_pair((*p)->xmin + (*p)->ymin, *p));
|
||||
sprite_list.emplace_front((*p)->xmin + (*p)->ymin, *p);
|
||||
sprite_order.push(*p);
|
||||
(*p)->order = next_order++;
|
||||
}
|
||||
|
Reference in New Issue
Block a user