Merge branch 'master' into jgrpp

# Conflicts:
#	config.lib
#	projects/openttd_vs140.vcxproj
#	projects/openttd_vs140.vcxproj.filters
#	projects/openttd_vs141.vcxproj
#	projects/openttd_vs141.vcxproj.filters
#	projects/openttd_vs142.vcxproj
#	projects/openttd_vs142.vcxproj.filters
#	src/aircraft_cmd.cpp
#	src/base_station_base.h
#	src/core/pool_type.hpp
#	src/disaster_vehicle.cpp
#	src/economy.cpp
#	src/engine.cpp
#	src/group.h
#	src/group_cmd.cpp
#	src/group_gui.cpp
#	src/lang/english.txt
#	src/lang/german.txt
#	src/linkgraph/linkgraph_gui.cpp
#	src/network/network_command.cpp
#	src/network/network_server.cpp
#	src/openttd.cpp
#	src/order_cmd.cpp
#	src/road_cmd.cpp
#	src/saveload/afterload.cpp
#	src/saveload/cargopacket_sl.cpp
#	src/saveload/linkgraph_sl.cpp
#	src/saveload/order_sl.cpp
#	src/saveload/station_sl.cpp
#	src/saveload/town_sl.cpp
#	src/saveload/vehicle_sl.cpp
#	src/screenshot.cpp
#	src/screenshot.h
#	src/settings_gui.cpp
#	src/settings_type.h
#	src/smallmap_gui.cpp
#	src/station.cpp
#	src/station_cmd.cpp
#	src/table/settings.ini
#	src/toolbar_gui.cpp
#	src/town_cmd.cpp
#	src/train.h
#	src/train_cmd.cpp
#	src/train_gui.cpp
#	src/vehicle.cpp
#	src/vehicle_base.h
#	src/vehiclelist.cpp
#	src/window_type.h
This commit is contained in:
Jonathan G Rennison
2020-01-06 18:45:51 +00:00
281 changed files with 2714 additions and 2467 deletions

View File

@@ -156,8 +156,7 @@ public:
uint exclusive_left = rtl ? right - icon_width - exclusive_width - 2 : left + icon_width + 2;
/* Draw list of companies */
const Company *c;
FOR_ALL_COMPANIES(c) {
for (const Company *c : Company::Iterate()) {
if ((HasBit(this->town->have_ratings, c->index) || this->town->exclusivity == c->index)) {
DrawCompanyIcon(c->index, icon_left, y + icon_y_offset);
@@ -706,8 +705,7 @@ private:
if (this->towns.NeedRebuild()) {
this->towns.clear();
const Town *t;
FOR_ALL_TOWNS(t) {
for (const Town *t : Town::Iterate()) {
this->towns.push_back(t);
}
@@ -991,8 +989,7 @@ public:
} else {
this->towns.clear();
const Town *t;
FOR_ALL_TOWNS(t) {
for (const Town *t : Town::Iterate()) {
this->string_filter.ResetState();
this->string_filter.AddLine(t->GetCachedName());
if (this->string_filter.GetState()) this->towns.push_back(t);
@@ -1973,8 +1970,7 @@ static void PlaceProc_House(TileIndex tile)
HouseZones house_zones = HouseSpec::Get(_cur_house)->building_availability & HZ_ZONALL;
uint best_dist = UINT_MAX;
int best_zone = (int)HZB_BEGIN - 1;
const Town *t;
FOR_ALL_TOWNS(t) {
for (const Town *t : Town::Iterate()) {
HouseZonesBits town_zone = TryGetTownRadiusGroup(t, tile);
if (HasBit(house_zones, town_zone)) {
/* If CTRL is NOT pressed keep only single town on the list, the best one.