Merge branch 'master' into jgrpp

# Conflicts:
#	src/genworld_gui.cpp
#	src/group_gui.cpp
#	src/saveload/saveload.cpp
#	src/settings_gui.cpp
#	src/toolbar_gui.cpp
#	src/vehicle_gui.cpp
#	src/vehicle_gui_base.h
#	src/widgets/dropdown.cpp
#	src/widgets/dropdown_type.h
This commit is contained in:
Jonathan G Rennison
2019-04-11 18:12:22 +01:00
53 changed files with 587 additions and 627 deletions

View File

@@ -2180,7 +2180,7 @@ void InitializeRailGUI()
* @param all_option Whether to add an 'all types' item.
* @return The populated and sorted #DropDownList.
*/
DropDownList *GetRailTypeDropDownList(bool for_replacement, bool all_option)
DropDownList GetRailTypeDropDownList(bool for_replacement, bool all_option)
{
RailTypes used_railtypes;
RailTypes avail_railtypes;
@@ -2196,11 +2196,10 @@ DropDownList *GetRailTypeDropDownList(bool for_replacement, bool all_option)
used_railtypes = GetRailTypes(true);
}
DropDownList *list = new DropDownList();
DropDownList list;
if (all_option) {
DropDownListStringItem *item = new DropDownListStringItem(STR_REPLACE_ALL_RAILTYPE, INVALID_RAILTYPE, false);
list->push_back(item);
list.emplace_back(new DropDownListStringItem(STR_REPLACE_ALL_RAILTYPE, INVALID_RAILTYPE, false));
}
Dimension d = { 0, 0 };
@@ -2231,7 +2230,7 @@ DropDownList *GetRailTypeDropDownList(bool for_replacement, bool all_option)
}
item->SetParam(0, rti->strings.menu_text);
item->SetParam(1, rti->max_speed);
list->push_back(item);
list.emplace_back(item);
}
return list;
}