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:
@@ -247,7 +247,7 @@ struct AIListWindow : public Window {
|
||||
this->vscroll->SetCount((int)this->info_list->size() + 1);
|
||||
|
||||
/* selected goes from -1 .. length of ai list - 1. */
|
||||
this->selected = min(this->selected, this->vscroll->GetCount() - 2);
|
||||
this->selected = std::min(this->selected, this->vscroll->GetCount() - 2);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -360,7 +360,7 @@ struct AISettingsWindow : public Window {
|
||||
void UpdateWidgetSize(int widget, Dimension *size, const Dimension &padding, Dimension *fill, Dimension *resize) override
|
||||
{
|
||||
if (widget == WID_AIS_BACKGROUND) {
|
||||
this->line_height = max(SETTING_BUTTON_HEIGHT, FONT_HEIGHT_NORMAL) + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||
this->line_height = std::max(SETTING_BUTTON_HEIGHT, FONT_HEIGHT_NORMAL) + WD_MATRIX_TOP + WD_MATRIX_BOTTOM;
|
||||
|
||||
resize->width = 1;
|
||||
resize->height = this->line_height;
|
||||
@@ -890,9 +890,9 @@ struct AIConfigWindow : public Window {
|
||||
case WID_AIC_INCREASE: {
|
||||
int new_value;
|
||||
if (widget == WID_AIC_DECREASE) {
|
||||
new_value = max(0, GetGameSettings().difficulty.max_no_competitors - 1);
|
||||
new_value = std::max(0, GetGameSettings().difficulty.max_no_competitors - 1);
|
||||
} else {
|
||||
new_value = min(MAX_COMPANIES - 1, GetGameSettings().difficulty.max_no_competitors + 1);
|
||||
new_value = std::min(MAX_COMPANIES - 1, GetGameSettings().difficulty.max_no_competitors + 1);
|
||||
}
|
||||
IConsoleSetSetting("difficulty.max_no_competitors", new_value);
|
||||
break;
|
||||
@@ -1187,7 +1187,7 @@ struct AIDebugWindow : public Window {
|
||||
this->autoscroll = this->vscroll->GetPosition() >= log->used - this->vscroll->GetCapacity();
|
||||
}
|
||||
if (this->autoscroll) {
|
||||
int scroll_pos = max(0, log->used - this->vscroll->GetCapacity());
|
||||
int scroll_pos = std::max(0, log->used - this->vscroll->GetCapacity());
|
||||
if (scroll_pos != this->vscroll->GetPosition()) {
|
||||
this->vscroll->SetPosition(scroll_pos);
|
||||
|
||||
|
Reference in New Issue
Block a user