From 2170c26e930c0bf68edd2fbb3206f3b4c04e6387 Mon Sep 17 00:00:00 2001 From: Hielke Morsink Date: Tue, 6 Nov 2018 22:48:58 +0100 Subject: [PATCH] Include what gets used To reduce including "big" files, like game.h", and just include the headers that are needed. Partly used IWYU to find the headers, but removed the ones that are hard requirements of included headers, like common.h and gameactions.h. --- .../windows/EditorObjectiveOptions.cpp | 21 ++++++++++++------- .../windows/EditorScenarioOptions.cpp | 11 ++++++---- 2 files changed, 20 insertions(+), 12 deletions(-) diff --git a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp index 02ed2d7e46..b23ebff214 100644 --- a/src/openrct2-ui/windows/EditorObjectiveOptions.cpp +++ b/src/openrct2-ui/windows/EditorObjectiveOptions.cpp @@ -7,16 +7,23 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ -#include -#include -#include +#include "../interface/Dropdown.h" +#include "../interface/Widget.h" +#include "../interface/Window.h" +#include "Window.h" + #include -#include #include #include #include +#include +#include +#include #include +#include #include +#include +#include #include #include #include @@ -735,14 +742,12 @@ static void window_editor_objective_options_main_update(rct_window* w) // Reset objective if invalid if (((parkFlags & PARK_FLAGS_NO_MONEY_SCENARIO) && - // The following objectives are the only valid objectives when there is no money objectiveType != OBJECTIVE_HAVE_FUN && objectiveType != OBJECTIVE_10_ROLLERCOASTERS && objectiveType != OBJECTIVE_GUESTS_AND_RATING && objectiveType != OBJECTIVE_10_ROLLERCOASTERS_LENGTH && objectiveType != OBJECTIVE_FINISH_5_ROLLERCOASTERS) - || ( - // The park must be free for the monthly ride income objective - !(parkFlags & PARK_FLAGS_PARK_FREE_ENTRY) && objectiveType == OBJECTIVE_MONTHLY_RIDE_INCOME)) + // The park must be free for the monthly ride income objective + || (!(parkFlags & PARK_FLAGS_PARK_FREE_ENTRY) && objectiveType == OBJECTIVE_MONTHLY_RIDE_INCOME)) { // Reset objective window_editor_objective_options_set_objective(w, OBJECTIVE_GUESTS_AND_RATING); diff --git a/src/openrct2-ui/windows/EditorScenarioOptions.cpp b/src/openrct2-ui/windows/EditorScenarioOptions.cpp index 84b88ea3b5..034b9fc326 100644 --- a/src/openrct2-ui/windows/EditorScenarioOptions.cpp +++ b/src/openrct2-ui/windows/EditorScenarioOptions.cpp @@ -7,18 +7,21 @@ * OpenRCT2 is licensed under the GNU General Public License version 3. *****************************************************************************/ +#include "../interface/Dropdown.h" +#include "../interface/Widget.h" +#include "../interface/Window.h" +#include "Window.h" + #include -#include -#include -#include #include #include #include #include #include -#include +#include #include #include +#include #include #include #include