From 9dec3e6522b1f8d92ca885929a929674cb9ece28 Mon Sep 17 00:00:00 2001 From: ehughsbaird <44244083+ehughsbaird@users.noreply.github.com> Date: Tue, 23 Jan 2024 03:16:12 +0000 Subject: [PATCH 1/2] Remove craft_command.h from character.h This is one of the most expensive headers to include, and there is literally no reason for it to be here. --- src/character.h | 2 +- tests/crafting_test.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/character.h b/src/character.h index d5281601bb745..adec598e7b78b 100644 --- a/src/character.h +++ b/src/character.h @@ -32,7 +32,6 @@ #include "character_id.h" #include "city.h" #include "coordinates.h" -#include "craft_command.h" #include "creature.h" #include "damage.h" #include "debug.h" @@ -66,6 +65,7 @@ class SkillLevelMap; class basecamp; class bionic_collection; class character_martial_arts; +class craft_command; class dispersion_sources; class effect; class effect_source; diff --git a/tests/crafting_test.cpp b/tests/crafting_test.cpp index 1c769fcb1009e..e317758d3a827 100644 --- a/tests/crafting_test.cpp +++ b/tests/crafting_test.cpp @@ -17,6 +17,7 @@ #include "cata_utility.h" #include "cata_catch.h" #include "character.h" +#include "craft_command.h" #include "game.h" #include "inventory.h" #include "item.h" From 389453dccefacf314d73c1393e5edbdb2a2261c0 Mon Sep 17 00:00:00 2001 From: ehughsbaird <44244083+ehughsbaird@users.noreply.github.com> Date: Tue, 23 Jan 2024 03:19:18 +0000 Subject: [PATCH 2/2] Remove recipe.h from character.h Another header that had no reason to be included in character.h, and was one of the most expensive headers to compile as such. --- src/activity_actor_definitions.h | 1 + src/character.h | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/activity_actor_definitions.h b/src/activity_actor_definitions.h index 23dfc1712c5c0..b5a04198c1bf3 100644 --- a/src/activity_actor_definitions.h +++ b/src/activity_actor_definitions.h @@ -22,6 +22,7 @@ #include "memory_fast.h" #include "pickup.h" #include "point.h" +#include "recipe.h" #include "string_id.h" #include "type_id.h" #include "units.h" diff --git a/src/character.h b/src/character.h index adec598e7b78b..b06d5a3666ff8 100644 --- a/src/character.h +++ b/src/character.h @@ -47,7 +47,6 @@ #include "player_activity.h" #include "point.h" #include "ranged.h" -#include "recipe.h" #include "ret_val.h" #include "stomach.h" #include "string_formatter.h" @@ -106,6 +105,7 @@ template struct enum_traits; enum npc_attitude : int; enum action_id : int; +enum class recipe_filter_flags : int; enum class steed_type : int; enum class proficiency_bonus_type : int;