mirror of
https://github.com/OpenTTD/OpenTTD
synced 2026-01-20 02:42:42 +01:00
Codechange: Use map.emplace() instead of map.insert(std::pair).
This avoids a copy of the pair into the map.
This commit is contained in:
committed by
Peter Nelson
parent
57d7359b1a
commit
ed2db80990
@@ -72,7 +72,7 @@ bool ClientNetworkContentSocketHandler::Receive_SERVER_INFO(Packet &p)
|
||||
for (uint i = 0; i < dependency_count; i++) {
|
||||
ContentID dependency_cid = (ContentID)p.Recv_uint32();
|
||||
ci->dependencies.push_back(dependency_cid);
|
||||
this->reverse_dependency_map.insert({ dependency_cid, ci->id });
|
||||
this->reverse_dependency_map.emplace(dependency_cid, ci->id);
|
||||
}
|
||||
|
||||
uint tag_count = p.Recv_uint8();
|
||||
|
||||
Reference in New Issue
Block a user