summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2013-11-22 21:42:47 +0000
committerrubidium <rubidium@openttd.org>2013-11-22 21:42:47 +0000
commit1b924f194fe07692e82f6d63696b74968d254cf2 (patch)
tree5ed9b650379364af3613336241d52b0bca2a96cf
parent830a49692d3eef1192c22170002108a8751ba1df (diff)
downloadopenttd-1b924f194fe07692e82f6d63696b74968d254cf2.tar.xz
(svn r26049) -Codechange: remove some dead code as order can't be NULL there
-rw-r--r--src/order_gui.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/order_gui.cpp b/src/order_gui.cpp
index 4b8a46c94..0645ecb68 100644
--- a/src/order_gui.cpp
+++ b/src/order_gui.cpp
@@ -1060,8 +1060,8 @@ public:
}
OrderConditionVariable ocv = order->GetConditionVariable();
/* Set the strings for the dropdown boxes. */
- this->GetWidget<NWidgetCore>(WID_O_COND_VARIABLE)->widget_data = STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE + (order == NULL ? 0 : ocv);
- this->GetWidget<NWidgetCore>(WID_O_COND_COMPARATOR)->widget_data = _order_conditional_condition[order == NULL ? 0 : order->GetConditionComparator()];
+ this->GetWidget<NWidgetCore>(WID_O_COND_VARIABLE)->widget_data = STR_ORDER_CONDITIONAL_LOAD_PERCENTAGE + ocv;
+ this->GetWidget<NWidgetCore>(WID_O_COND_COMPARATOR)->widget_data = _order_conditional_condition[order->GetConditionComparator()];
this->SetWidgetDisabledState(WID_O_COND_COMPARATOR, ocv == OCV_UNCONDITIONALLY);
this->SetWidgetDisabledState(WID_O_COND_VALUE, ocv == OCV_REQUIRES_SERVICE || ocv == OCV_UNCONDITIONALLY);
break;