summaryrefslogtreecommitdiff
path: root/src/saveload/afterload.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/saveload/afterload.cpp')
-rw-r--r--src/saveload/afterload.cpp6
1 files changed, 2 insertions, 4 deletions
diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp
index 8df01bc58..d175b612f 100644
--- a/src/saveload/afterload.cpp
+++ b/src/saveload/afterload.cpp
@@ -253,8 +253,7 @@ static void InitializeWindowsAndCaches()
}
/* Count number of objects per type */
- Object *o;
- FOR_ALL_OBJECTS(o) {
+ for (Object *o : Object::Iterate()) {
Object::IncTypeCount(o->type);
}
@@ -2474,8 +2473,7 @@ bool AfterLoadGame()
/* Add (random) colour to all objects. */
if (IsSavegameVersionBefore(SLV_148)) {
- Object *o;
- FOR_ALL_OBJECTS(o) {
+ for (Object *o : Object::Iterate()) {
Owner owner = GetTileOwner(o->location.tile);
o->colour = (owner == OWNER_NONE) ? Random() & 0xF : Company::Get(owner)->livery->colour1;
}