Merge branch 'master' into jgrpp
# Conflicts: # cmake/CompileFlags.cmake # src/aircraft_cmd.cpp # src/blitter/32bpp_anim.cpp # src/cargopacket.cpp # src/cheat_gui.cpp # src/company_cmd.cpp # src/company_gui.cpp # src/core/pool_func.hpp # src/date.cpp # src/economy.cpp # src/error_gui.cpp # src/ground_vehicle.cpp # src/ground_vehicle.hpp # src/group_gui.cpp # src/industry_cmd.cpp # src/lang/dutch.txt # src/lang/french.txt # src/lang/german.txt # src/linkgraph/linkgraph_gui.cpp # src/linkgraph/mcf.cpp # src/network/network_content.cpp # src/network/network_server.cpp # src/network/network_udp.cpp # src/newgrf_engine.cpp # src/newgrf_station.cpp # src/order_cmd.cpp # src/order_gui.cpp # src/pathfinder/follow_track.hpp # src/pathfinder/yapf/yapf_common.hpp # src/saveload/saveload.cpp # src/settings_gui.cpp # src/station_cmd.cpp # src/station_kdtree.h # src/string_func.h # src/table/settings.ini # src/tgp.cpp # src/timetable_cmd.cpp # src/timetable_gui.cpp # src/toolbar_gui.cpp # src/town_cmd.cpp # src/train_cmd.cpp # src/train_gui.cpp # src/tree_gui.cpp # src/tunnelbridge_cmd.cpp # src/vehicle.cpp # src/vehicle_gui.cpp # src/video/sdl2_v.cpp # src/video/sdl_v.cpp # src/video/win32_v.cpp # src/viewport.cpp # src/viewport_sprite_sorter_sse4.cpp # src/window.cpp
This commit is contained in:
@@ -341,7 +341,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
min_height = max(min_height, height);
|
||||
min_height = std::max(min_height, height);
|
||||
this->vscroll[2]->SetCount(min_height);
|
||||
}
|
||||
|
||||
@@ -593,7 +593,7 @@ public:
|
||||
int left = r.left + WD_MATRIX_LEFT;
|
||||
int right = r.right - WD_MATRIX_RIGHT;
|
||||
int y = r.top;
|
||||
int max = min(this->vscroll[0]->GetPosition() + this->vscroll[0]->GetCapacity(), this->groups.size());
|
||||
int max = std::min<int>(this->vscroll[0]->GetPosition() + this->vscroll[0]->GetCapacity(), this->groups.size());
|
||||
|
||||
/* Then treat all groups defined by/for the current company */
|
||||
for (int i = this->vscroll[0]->GetPosition(); i < max; ++i) {
|
||||
@@ -651,7 +651,7 @@ public:
|
||||
int y = r.top;
|
||||
|
||||
Scrollbar *draw_vscroll = vscroll[1];
|
||||
uint max = min(draw_vscroll->GetPosition() + draw_vscroll->GetCapacity(), this->templates.size());
|
||||
uint max = std::min<uint>(draw_vscroll->GetPosition() + draw_vscroll->GetCapacity(), this->templates.size());
|
||||
|
||||
const TemplateVehicle *v;
|
||||
for (uint i = draw_vscroll->GetPosition(); i < max; ++i) {
|
||||
@@ -756,8 +756,8 @@ public:
|
||||
SetDParam(0, tmp->full_weight);
|
||||
if (_settings_client.gui.show_train_weight_ratios_in_details) {
|
||||
SetDParam(1, STR_VEHICLE_INFO_WEIGHT_RATIOS);
|
||||
SetDParam(2, (100 * tmp->power) / max<uint>(1, tmp->full_weight));
|
||||
SetDParam(3, (tmp->max_te / 10) / max<uint>(1, tmp->full_weight));
|
||||
SetDParam(2, (100 * tmp->power) / std::max<uint>(1, tmp->full_weight));
|
||||
SetDParam(3, (tmp->max_te / 10) / std::max<uint>(1, tmp->full_weight));
|
||||
} else {
|
||||
SetDParam(1, STR_EMPTY);
|
||||
}
|
||||
|
Reference in New Issue
Block a user