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:
@@ -372,7 +372,7 @@ struct GameOptionsWindow : Window {
|
||||
/* Find the biggest description for the default size. */
|
||||
for (int i = 0; i < BaseGraphics::GetNumSets(); i++) {
|
||||
SetDParamStr(0, BaseGraphics::GetSet(i)->GetDescription(GetCurrentLanguageIsoCode()));
|
||||
size->height = max(size->height, (uint)GetStringHeight(STR_BLACK_RAW_STRING, size->width));
|
||||
size->height = std::max(size->height, (uint)GetStringHeight(STR_BLACK_RAW_STRING, size->width));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -391,7 +391,7 @@ struct GameOptionsWindow : Window {
|
||||
/* Find the biggest description for the default size. */
|
||||
for (int i = 0; i < BaseSounds::GetNumSets(); i++) {
|
||||
SetDParamStr(0, BaseSounds::GetSet(i)->GetDescription(GetCurrentLanguageIsoCode()));
|
||||
size->height = max(size->height, (uint)GetStringHeight(STR_BLACK_RAW_STRING, size->width));
|
||||
size->height = std::max(size->height, (uint)GetStringHeight(STR_BLACK_RAW_STRING, size->width));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -399,7 +399,7 @@ struct GameOptionsWindow : Window {
|
||||
/* Find the biggest description for the default size. */
|
||||
for (int i = 0; i < BaseMusic::GetNumSets(); i++) {
|
||||
SetDParamStr(0, BaseMusic::GetSet(i)->GetDescription(GetCurrentLanguageIsoCode()));
|
||||
size->height = max(size->height, (uint)GetStringHeight(STR_BLACK_RAW_STRING, size->width));
|
||||
size->height = std::max(size->height, (uint)GetStringHeight(STR_BLACK_RAW_STRING, size->width));
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -1353,7 +1353,7 @@ uint SettingsContainer::GetMaxHelpHeight(int maxw)
|
||||
{
|
||||
uint biggest = 0;
|
||||
for (EntryVector::const_iterator it = this->entries.begin(); it != this->entries.end(); ++it) {
|
||||
biggest = max(biggest, (*it)->GetMaxHelpHeight(maxw));
|
||||
biggest = std::max(biggest, (*it)->GetMaxHelpHeight(maxw));
|
||||
}
|
||||
return biggest;
|
||||
}
|
||||
@@ -1654,7 +1654,6 @@ static SettingsContainer &GetSettingsTree()
|
||||
construction->Add(new SettingEntry("gui.quick_goto"));
|
||||
construction->Add(new SettingEntry("gui.default_rail_type"));
|
||||
construction->Add(new SettingEntry("gui.default_road_type"));
|
||||
construction->Add(new SettingEntry("gui.disable_unsuitable_building"));
|
||||
}
|
||||
|
||||
SettingsPage *departureboards = interface->Add(new SettingsPage(STR_CONFIG_SETTING_INTERFACE_DEPARTUREBOARDS));
|
||||
@@ -2111,7 +2110,7 @@ struct GameSettingsWindow : Window {
|
||||
{
|
||||
switch (widget) {
|
||||
case WID_GS_OPTIONSPANEL:
|
||||
resize->height = SETTING_HEIGHT = max(max<int>(_circle_size.height, SETTING_BUTTON_HEIGHT), FONT_HEIGHT_NORMAL) + 1;
|
||||
resize->height = SETTING_HEIGHT = std::max({(int)_circle_size.height, SETTING_BUTTON_HEIGHT, FONT_HEIGHT_NORMAL}) + 1;
|
||||
resize->width = 1;
|
||||
|
||||
size->height = 5 * resize->height + SETTINGTREE_TOP_OFFSET + SETTINGTREE_BOTTOM_OFFSET;
|
||||
@@ -2125,16 +2124,16 @@ struct GameSettingsWindow : Window {
|
||||
};
|
||||
for (uint i = 0; i < lengthof(setting_types); i++) {
|
||||
SetDParam(0, setting_types[i]);
|
||||
size->width = max(size->width, GetStringBoundingBox(STR_CONFIG_SETTING_TYPE).width);
|
||||
size->width = std::max(size->width, GetStringBoundingBox(STR_CONFIG_SETTING_TYPE).width);
|
||||
}
|
||||
size->height = 2 * FONT_HEIGHT_NORMAL + WD_PAR_VSEP_NORMAL +
|
||||
max(size->height, GetSettingsTree().GetMaxHelpHeight(size->width));
|
||||
std::max(size->height, GetSettingsTree().GetMaxHelpHeight(size->width));
|
||||
break;
|
||||
}
|
||||
|
||||
case WID_GS_RESTRICT_CATEGORY:
|
||||
case WID_GS_RESTRICT_TYPE:
|
||||
size->width = max(GetStringBoundingBox(STR_CONFIG_SETTING_RESTRICT_CATEGORY).width, GetStringBoundingBox(STR_CONFIG_SETTING_RESTRICT_TYPE).width);
|
||||
size->width = std::max(GetStringBoundingBox(STR_CONFIG_SETTING_RESTRICT_CATEGORY).width, GetStringBoundingBox(STR_CONFIG_SETTING_RESTRICT_TYPE).width);
|
||||
break;
|
||||
|
||||
default:
|
||||
@@ -2908,7 +2907,7 @@ struct CustomCurrencyWindow : Window {
|
||||
case WID_CC_YEAR: { // Year to switch to euro
|
||||
int val = atoi(str);
|
||||
|
||||
_custom_currency.to_euro = (val < 2000 ? CF_NOEURO : min(val, MAX_YEAR));
|
||||
_custom_currency.to_euro = (val < 2000 ? CF_NOEURO : std::min(val, MAX_YEAR));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user