From 83f0b02ff5d61ee7ba9ce37730a9a6a0f67fbf4d Mon Sep 17 00:00:00 2001 From: alberth Date: Sun, 7 Sep 2014 16:09:48 +0000 Subject: [PATCH] (svn r26798) -Codechange: Code style fixes. --- src/autoreplace_gui.cpp | 8 ++------ src/build_vehicle_gui.cpp | 3 ++- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/src/autoreplace_gui.cpp b/src/autoreplace_gui.cpp index e6ce64cfa7..e0470c9b34 100644 --- a/src/autoreplace_gui.cpp +++ b/src/autoreplace_gui.cpp @@ -393,16 +393,12 @@ public: * Either engines list is empty * or The selected replacement engine has a replacement (to prevent loops). */ this->SetWidgetDisabledState(WID_RV_START_REPLACE, - this->sel_engine[0] == INVALID_ENGINE || - this->sel_engine[1] == INVALID_ENGINE || - EngineReplacementForCompany(c, this->sel_engine[1], this->sel_group) != INVALID_ENGINE); + this->sel_engine[0] == INVALID_ENGINE || this->sel_engine[1] == INVALID_ENGINE || EngineReplacementForCompany(c, this->sel_engine[1], this->sel_group) != INVALID_ENGINE); /* Disable the "Stop Replacing" button if: * The left engines list (existing vehicle) is empty * or The selected vehicle has no replacement set up */ - this->SetWidgetDisabledState(WID_RV_STOP_REPLACE, - this->sel_engine[0] == INVALID_ENGINE || - !EngineHasReplacementForCompany(c, this->sel_engine[0], this->sel_group)); + this->SetWidgetDisabledState(WID_RV_STOP_REPLACE, this->sel_engine[0] == INVALID_ENGINE || !EngineHasReplacementForCompany(c, this->sel_engine[0], this->sel_group)); if (this->window_number == VEH_TRAIN) { /* sets the colour of that art thing */ diff --git a/src/build_vehicle_gui.cpp b/src/build_vehicle_gui.cpp index 57e306e882..747ac0fe68 100644 --- a/src/build_vehicle_gui.cpp +++ b/src/build_vehicle_gui.cpp @@ -948,7 +948,7 @@ struct BuildVehicleWindow : Window { this->vehicle_type = type; this->window_number = tile == INVALID_TILE ? (int)type : tile; - this->sel_engine = INVALID_ENGINE; + this->sel_engine = INVALID_ENGINE; this->sort_criteria = _last_sort_criteria[type]; this->descending_sort_order = _last_sort_order[type]; @@ -1311,6 +1311,7 @@ struct BuildVehicleWindow : Window { case WID_BV_CARGO_FILTER_DROPDOWN: SetDParam(0, this->cargo_filter_texts[this->cargo_filter_criteria]); + break; } }