From 5ed8f1203bbb9696176f091fec78404d6ce72f9e Mon Sep 17 00:00:00 2001 From: Peter Nelson Date: Sun, 28 Sep 2025 18:09:57 +0100 Subject: [PATCH] Codechange: Cleanup unnecessary includes of spritecache.h (#14678) --- src/aircraft_cmd.cpp | 1 - src/aircraft_gui.cpp | 1 - src/depot_gui.cpp | 2 +- src/fontcache.h | 4 ++-- src/fontcache/spritefontcache.cpp | 1 + src/newgrf/newgrf_act12.cpp | 1 + src/newgrf_canal.cpp | 1 - src/rail_gui.cpp | 1 - src/roadveh_cmd.cpp | 1 - src/ship_cmd.cpp | 1 - src/ship_gui.cpp | 1 - src/spritecache_internal.h | 2 +- src/train_cmd.cpp | 1 - src/vehicle_gui.cpp | 1 - 14 files changed, 6 insertions(+), 13 deletions(-) diff --git a/src/aircraft_cmd.cpp b/src/aircraft_cmd.cpp index 91f0f7968f..f3cd7f09b7 100644 --- a/src/aircraft_cmd.cpp +++ b/src/aircraft_cmd.cpp @@ -16,7 +16,6 @@ #include "news_func.h" #include "newgrf_engine.h" #include "newgrf_sound.h" -#include "spritecache.h" #include "error_func.h" #include "strings_func.h" #include "command_func.h" diff --git a/src/aircraft_gui.cpp b/src/aircraft_gui.cpp index 5b7d67582b..3709dfb721 100644 --- a/src/aircraft_gui.cpp +++ b/src/aircraft_gui.cpp @@ -14,7 +14,6 @@ #include "strings_func.h" #include "vehicle_func.h" #include "window_gui.h" -#include "spritecache.h" #include "zoom_func.h" #include "table/strings.h" diff --git a/src/depot_gui.cpp b/src/depot_gui.cpp index 18856c2a95..3644a31694 100644 --- a/src/depot_gui.cpp +++ b/src/depot_gui.cpp @@ -17,7 +17,7 @@ #include "viewport_func.h" #include "command_func.h" #include "depot_base.h" -#include "spritecache.h" +#include "spritecache_type.h" #include "strings_func.h" #include "sound_func.h" #include "vehicle_func.h" diff --git a/src/fontcache.h b/src/fontcache.h index 099f9b17e6..a74e0a57b6 100644 --- a/src/fontcache.h +++ b/src/fontcache.h @@ -10,9 +10,9 @@ #ifndef FONTCACHE_H #define FONTCACHE_H +#include "gfx_type.h" #include "provider_manager.h" -#include "string_type.h" -#include "spritecache.h" +#include "spritecache_type.h" /** Glyphs are characters from a font. */ typedef uint32_t GlyphID; diff --git a/src/fontcache/spritefontcache.cpp b/src/fontcache/spritefontcache.cpp index 96f9fd8cc3..a1c2f29770 100644 --- a/src/fontcache/spritefontcache.cpp +++ b/src/fontcache/spritefontcache.cpp @@ -10,6 +10,7 @@ #include "../stdafx.h" #include "../fontcache.h" #include "../gfx_layout.h" +#include "../spritecache.h" #include "../string_func.h" #include "../zoom_func.h" #include "spritefontcache.h" diff --git a/src/newgrf/newgrf_act12.cpp b/src/newgrf/newgrf_act12.cpp index 2e0250775b..124d2f1afe 100644 --- a/src/newgrf/newgrf_act12.cpp +++ b/src/newgrf/newgrf_act12.cpp @@ -10,6 +10,7 @@ #include "../stdafx.h" #include "../debug.h" #include "../fontcache.h" +#include "../spritecache.h" #include "newgrf_bytereader.h" #include "newgrf_internal.h" diff --git a/src/newgrf_canal.cpp b/src/newgrf_canal.cpp index 4cb05922dd..0e593ba749 100644 --- a/src/newgrf_canal.cpp +++ b/src/newgrf_canal.cpp @@ -13,7 +13,6 @@ #include "newgrf_canal.h" #include "water.h" #include "water_map.h" -#include "spritecache.h" #include "safeguards.h" diff --git a/src/rail_gui.cpp b/src/rail_gui.cpp index 7b9a503577..3ff53b0648 100644 --- a/src/rail_gui.cpp +++ b/src/rail_gui.cpp @@ -29,7 +29,6 @@ #include "dropdown_func.h" #include "tunnelbridge.h" #include "tilehighlight_func.h" -#include "spritecache.h" #include "core/geometry_func.hpp" #include "hotkeys.h" #include "engine_base.h" diff --git a/src/roadveh_cmd.cpp b/src/roadveh_cmd.cpp index 70717f15b8..060ec3694b 100644 --- a/src/roadveh_cmd.cpp +++ b/src/roadveh_cmd.cpp @@ -28,7 +28,6 @@ #include "depot_map.h" #include "effectvehicle_func.h" #include "roadstop_base.h" -#include "spritecache.h" #include "core/random_func.hpp" #include "company_base.h" #include "core/backup_type.hpp" diff --git a/src/ship_cmd.cpp b/src/ship_cmd.cpp index f741c93f8a..c976cabc0a 100644 --- a/src/ship_cmd.cpp +++ b/src/ship_cmd.cpp @@ -19,7 +19,6 @@ #include "pathfinder/yapf/yapf.h" #include "pathfinder/yapf/yapf_ship_regions.h" #include "newgrf_sound.h" -#include "spritecache.h" #include "strings_func.h" #include "window_func.h" #include "timer/timer_game_calendar.h" diff --git a/src/ship_gui.cpp b/src/ship_gui.cpp index 7bdedb82dc..eb5eb4d42f 100644 --- a/src/ship_gui.cpp +++ b/src/ship_gui.cpp @@ -14,7 +14,6 @@ #include "vehicle_gui.h" #include "strings_func.h" #include "vehicle_func.h" -#include "spritecache.h" #include "zoom_func.h" #include "table/strings.h" diff --git a/src/spritecache_internal.h b/src/spritecache_internal.h index 5d7b02e615..367db3601e 100644 --- a/src/spritecache_internal.h +++ b/src/spritecache_internal.h @@ -13,7 +13,7 @@ #include "core/math_func.hpp" #include "gfx_type.h" #include "spritecache_type.h" -#include "spriteloader/spriteloader.hpp" +#include "spriteloader/sprite_file_type.hpp" #include "table/sprites.h" diff --git a/src/train_cmd.cpp b/src/train_cmd.cpp index 136f321c71..5723eb11cf 100644 --- a/src/train_cmd.cpp +++ b/src/train_cmd.cpp @@ -26,7 +26,6 @@ #include "newgrf_station.h" #include "effectvehicle_func.h" #include "network/network.h" -#include "spritecache.h" #include "core/random_func.hpp" #include "company_base.h" #include "newgrf.h" diff --git a/src/vehicle_gui.cpp b/src/vehicle_gui.cpp index 0ea6f71e44..251b905aa1 100644 --- a/src/vehicle_gui.cpp +++ b/src/vehicle_gui.cpp @@ -30,7 +30,6 @@ #include "dropdown_func.h" #include "timetable.h" #include "articulated_vehicles.h" -#include "spritecache.h" #include "core/geometry_func.hpp" #include "core/container_func.hpp" #include "company_base.h"