summaryrefslogtreecommitdiff
path: root/src/order_gui.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/order_gui.cpp')
-rw-r--r--src/order_gui.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 0b1ee2ae6..a48638a85 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -1295,11 +1295,11 @@ public:
break;
case WID_O_COND_VARIABLE: {
- DropDownList *list = new DropDownList();
+ DropDownList list;
for (uint i = 0; i < lengthof(_order_conditional_variable); i++) {
- list->push_back(new DropDownListStringItem(STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE + _order_conditional_variable[i], _order_conditional_variable[i], false));
+ list.emplace_back(new DropDownListStringItem(STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE + _order_conditional_variable[i], _order_conditional_variable[i], false));
}
- ShowDropDownList(this, list, this->vehicle->GetOrder(this->OrderGetSel())->GetConditionVariable(), WID_O_COND_VARIABLE);
+ ShowDropDownList(this, std::move(list), this->vehicle->GetOrder(this->OrderGetSel())->GetConditionVariable(), WID_O_COND_VARIABLE);
break;
}