summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorHenry Wilson <m3henry@googlemail.com>2019-02-18 22:39:06 +0000
committerPeterN <peter@fuzzle.org>2019-03-26 20:15:57 +0000
commita0f36a50e6324f570985f5010eb0543ec0673aeb (patch)
tree09f9c9abd097acc244f80366da42cb8702c7ed19 /src/openttd.cpp
parentca2f33c6d025c0c45fb4bc472493290445312de5 (diff)
downloadopenttd-a0f36a50e6324f570985f5010eb0543ec0673aeb.tar.xz
Codechange: Replaced SmallVector::Append() with std::vector::[push|emplace]_back()
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 5478ec5a2..5c7af2dfc 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -445,7 +445,7 @@ struct AfterNewGRFScan : NewGRFScanCallback {
if (dedicated_host != NULL) {
_network_bind_list.Clear();
- *_network_bind_list.Append() = stredup(dedicated_host);
+ _network_bind_list.push_back(stredup(dedicated_host));
}
if (dedicated_port != 0) _settings_client.network.server_port = dedicated_port;
@@ -1177,7 +1177,7 @@ static void CheckCaches()
SmallVector<TownCache, 4> old_town_caches;
Town *t;
FOR_ALL_TOWNS(t) {
- MemCpyT(old_town_caches.Append(), &t->cache);
+ old_town_caches.push_back(t->cache);
}
extern void RebuildTownCaches();
@@ -1195,7 +1195,7 @@ static void CheckCaches()
/* Check company infrastructure cache. */
SmallVector<CompanyInfrastructure, 4> old_infrastructure;
Company *c;
- FOR_ALL_COMPANIES(c) MemCpyT(old_infrastructure.Append(), &c->infrastructure);
+ FOR_ALL_COMPANIES(c) old_infrastructure.push_back(c->infrastructure);
extern void AfterLoadCompanyStats();
AfterLoadCompanyStats();