Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()

This commit is contained in:
Henry Wilson
2019-02-18 22:39:06 +00:00
committed by PeterN
parent ca2f33c6d0
commit a0f36a50e6
79 changed files with 402 additions and 403 deletions

View File

@@ -633,12 +633,12 @@ void NetworkAddServer(const char *b)
void GetBindAddresses(NetworkAddressList *addresses, uint16 port)
{
for (char **iter = _network_bind_list.Begin(); iter != _network_bind_list.End(); iter++) {
*addresses->Append() = NetworkAddress(*iter, port);
addresses->emplace_back(*iter, port);
}
/* No address, so bind to everything. */
if (addresses->size() == 0) {
*addresses->Append() = NetworkAddress("", port);
addresses->emplace_back("", port);
}
}
@@ -650,7 +650,7 @@ void NetworkRebuildHostList()
_network_host_list.Clear();
for (NetworkGameList *item = _network_game_list; item != NULL; item = item->next) {
if (item->manually) *_network_host_list.Append() = stredup(item->address.GetAddressAsString(false));
if (item->manually) _network_host_list.push_back(stredup(item->address.GetAddressAsString(false)));
}
}