From 68ff3fd062bce9ad0f193087a0eda5d46c47031b Mon Sep 17 00:00:00 2001 From: Rubidium Date: Sun, 7 May 2023 21:54:36 +0200 Subject: [PATCH] Change: include fmt.h C++ headers in stdafx.h This to prevent compilation issues between runs with and without precompiled headers. Also remove the headers from the rest of the code base as they are not needed there anymore, although they do relatively little harm. --- src/base_consist.h | 1 - src/bitmap_type.h | 1 - src/cargotype.h | 1 - src/command_type.h | 1 - src/company_base.h | 1 - src/console_gui.cpp | 1 - src/core/kdtree.hpp | 2 -- src/core/math_func.hpp | 2 -- src/core/overflowsafe_type.hpp | 1 - src/core/smallvec_type.hpp | 1 - src/dedicated.cpp | 1 - src/driver.cpp | 1 - src/fileio_func.h | 2 -- src/fios.cpp | 2 -- src/framerate_gui.cpp | 1 - src/game/game_text.cpp | 1 - src/gamelog.h | 1 - src/gfx_layout.h | 3 --- src/group.h | 1 - src/industrytype.h | 1 - src/ini_type.h | 2 -- src/linkgraph/linkgraph_gui.h | 1 - src/linkgraph/mcf.h | 1 - src/linkgraph/refresh.h | 1 - src/misc/dbg_helpers.h | 1 - src/misc/endian_buffer.hpp | 1 - src/misc/lrucache.hpp | 2 -- src/music/midifile.hpp | 2 -- src/music_gui.cpp | 1 - src/network/core/address.h | 1 - src/network/core/config.cpp | 1 - src/network/core/http_curl.cpp | 1 - src/network/core/packet.h | 2 -- src/network/core/tcp_content_type.h | 2 -- src/newgrf_class.h | 1 - src/newgrf_config.h | 1 - src/newgrf_profiling.h | 3 --- src/newgrf_text.h | 2 -- src/newgrf_townname.h | 1 - src/os/macosx/font_osx.cpp | 1 - src/os/macosx/string_osx.cpp | 1 - src/os/macosx/string_osx.h | 1 - src/os/windows/string_uniscribe.cpp | 1 - src/os/windows/string_uniscribe.h | 1 - src/pathfinder/yapf/yapf_costrail.hpp | 1 - src/random_access_file_type.h | 1 - src/road.h | 1 - src/saveload/engine_sl.cpp | 1 - src/saveload/oldloader.cpp | 1 - src/saveload/saveload.cpp | 2 -- src/saveload/saveload.h | 3 --- src/script/api/script_admin.hpp | 1 - src/script/api/script_priorityqueue.hpp | 1 - src/script/script_storage.hpp | 1 - src/script/squirrel_helper_type.hpp | 1 - src/settings_gui.cpp | 2 -- src/signs_base.h | 1 - src/station_gui.cpp | 1 - src/station_gui.h | 1 - src/stdafx.h | 21 +++++++++++++++++---- src/strgen/strgen.cpp | 1 - src/string_type.h | 2 -- src/tar_type.h | 1 - src/textfile_gui.h | 1 - src/timer/timer.h | 1 - src/timetable_gui.cpp | 1 - src/townname_type.h | 1 - src/vehicle_gui_base.h | 1 - src/video/video_driver.hpp | 2 -- src/window_gui.h | 2 -- 70 files changed, 17 insertions(+), 94 deletions(-) diff --git a/src/base_consist.h b/src/base_consist.h index b048ff2887..0249182dfb 100644 --- a/src/base_consist.h +++ b/src/base_consist.h @@ -12,7 +12,6 @@ #include "order_type.h" #include "timer/timer_game_calendar.h" -#include /** Various front vehicle properties that are preserved when autoreplacing, using order-backup or switching front engines within a consist. */ struct BaseConsist { diff --git a/src/bitmap_type.h b/src/bitmap_type.h index 3aff869724..3ff0297910 100644 --- a/src/bitmap_type.h +++ b/src/bitmap_type.h @@ -10,7 +10,6 @@ #ifndef BITMAP_TYPE_HPP #define BITMAP_TYPE_HPP -#include /** Represents a tile area containing containing individually set tiles. * Each tile must be contained within the preallocated area. diff --git a/src/cargotype.h b/src/cargotype.h index 6e73f36958..76d5aa5cf2 100644 --- a/src/cargotype.h +++ b/src/cargotype.h @@ -17,7 +17,6 @@ #include "landscape_type.h" #include "core/bitmath_func.hpp" #include "core/span_type.hpp" -#include /** Globally unique label of a cargo type. */ typedef uint32 CargoLabel; diff --git a/src/command_type.h b/src/command_type.h index b33b815e6a..174120fb91 100644 --- a/src/command_type.h +++ b/src/command_type.h @@ -13,7 +13,6 @@ #include "economy_type.h" #include "strings_type.h" #include "tile_type.h" -#include struct GRFFile; diff --git a/src/company_base.h b/src/company_base.h index 9f0daa138c..d41da57f45 100644 --- a/src/company_base.h +++ b/src/company_base.h @@ -17,7 +17,6 @@ #include "timer/timer_game_calendar.h" #include "settings_type.h" #include "group.h" -#include #include /** Statistics about the economy. */ diff --git a/src/console_gui.cpp b/src/console_gui.cpp index 270d005d0e..b5f5fa5d02 100644 --- a/src/console_gui.cpp +++ b/src/console_gui.cpp @@ -23,7 +23,6 @@ #include "timer/timer.h" #include "timer/timer_window.h" #include -#include #include "widgets/console_widget.h" diff --git a/src/core/kdtree.hpp b/src/core/kdtree.hpp index cb864e04d7..7da2aad2b9 100644 --- a/src/core/kdtree.hpp +++ b/src/core/kdtree.hpp @@ -11,8 +11,6 @@ #define KDTREE_HPP #include "../stdafx.h" -#include -#include /** * K-dimensional tree, specialised for 2-dimensional space. diff --git a/src/core/math_func.hpp b/src/core/math_func.hpp index 9f8c5f0179..254496a733 100644 --- a/src/core/math_func.hpp +++ b/src/core/math_func.hpp @@ -10,8 +10,6 @@ #ifndef MATH_FUNC_HPP #define MATH_FUNC_HPP -#include -#include /** * Returns the absolute value of (scalar) variable. diff --git a/src/core/overflowsafe_type.hpp b/src/core/overflowsafe_type.hpp index 37eab29023..53057008b2 100644 --- a/src/core/overflowsafe_type.hpp +++ b/src/core/overflowsafe_type.hpp @@ -12,7 +12,6 @@ #include "math_func.hpp" -#include #ifdef __has_builtin # if __has_builtin(__builtin_add_overflow) && __has_builtin(__builtin_sub_overflow) && __has_builtin(__builtin_mul_overflow) diff --git a/src/core/smallvec_type.hpp b/src/core/smallvec_type.hpp index 087f217971..086e2b531f 100644 --- a/src/core/smallvec_type.hpp +++ b/src/core/smallvec_type.hpp @@ -11,7 +11,6 @@ #define SMALLVEC_TYPE_HPP #include "mem_func.hpp" -#include /** * Helper function to append an item to a vector if it is not already contained diff --git a/src/dedicated.cpp b/src/dedicated.cpp index 92cead038c..df457f2559 100644 --- a/src/dedicated.cpp +++ b/src/dedicated.cpp @@ -10,7 +10,6 @@ #include "stdafx.h" #include "fileio_func.h" #include "debug.h" -#include std::string _log_file; ///< File to reroute output of a forked OpenTTD to std::unique_ptr _log_fd; ///< File to reroute output of a forked OpenTTD to diff --git a/src/driver.cpp b/src/driver.cpp index b6bf486427..1e4f5e0bd9 100644 --- a/src/driver.cpp +++ b/src/driver.cpp @@ -16,7 +16,6 @@ #include "video/video_driver.hpp" #include "string_func.h" #include "table/strings.h" -#include #include #include "safeguards.h" diff --git a/src/fileio_func.h b/src/fileio_func.h index c6d2a8ef0e..93b6123dca 100644 --- a/src/fileio_func.h +++ b/src/fileio_func.h @@ -12,8 +12,6 @@ #include "core/enum_type.hpp" #include "fileio_type.h" -#include -#include void FioFCloseFile(FILE *f); FILE *FioFOpenFile(const std::string &filename, const char *mode, Subdirectory subdir, size_t *filesize = nullptr); diff --git a/src/fios.cpp b/src/fios.cpp index 6bc09d3619..265a333c61 100644 --- a/src/fios.cpp +++ b/src/fios.cpp @@ -20,8 +20,6 @@ #include "strings_func.h" #include "tar_type.h" #include -#include -#include #include #ifndef _WIN32 diff --git a/src/framerate_gui.cpp b/src/framerate_gui.cpp index 4727a587a5..eaa8fbf772 100644 --- a/src/framerate_gui.cpp +++ b/src/framerate_gui.cpp @@ -29,7 +29,6 @@ #include #include -#include #include "safeguards.h" diff --git a/src/game/game_text.cpp b/src/game/game_text.cpp index de3847e292..dc78e6a927 100644 --- a/src/game/game_text.cpp +++ b/src/game/game_text.cpp @@ -22,7 +22,6 @@ #include "table/strgen_tables.h" #include -#include #include "../safeguards.h" diff --git a/src/gamelog.h b/src/gamelog.h index 98ed13d693..8505c0a170 100644 --- a/src/gamelog.h +++ b/src/gamelog.h @@ -10,7 +10,6 @@ #ifndef GAMELOG_H #define GAMELOG_H -#include #include "newgrf_config.h" /** The actions we log. */ diff --git a/src/gfx_layout.h b/src/gfx_layout.h index 47eb60544e..504bd51a9b 100644 --- a/src/gfx_layout.h +++ b/src/gfx_layout.h @@ -15,11 +15,8 @@ #include "core/smallmap_type.hpp" #include -#include #include #include -#include -#include /** * Text drawing parameters, which can change while drawing a line, but are kept between multiple parts diff --git a/src/group.h b/src/group.h index 7cba5ac538..d901a48676 100644 --- a/src/group.h +++ b/src/group.h @@ -16,7 +16,6 @@ #include "vehicle_type.h" #include "engine_type.h" #include "livery.h" -#include typedef Pool GroupPool; extern GroupPool _group_pool; ///< Pool of groups. diff --git a/src/industrytype.h b/src/industrytype.h index d5f1ba96a7..79635baaed 100644 --- a/src/industrytype.h +++ b/src/industrytype.h @@ -11,7 +11,6 @@ #define INDUSTRYTYPE_H #include -#include #include "map_type.h" #include "slope_type.h" #include "industry_type.h" diff --git a/src/ini_type.h b/src/ini_type.h index 607e8940b4..0d50b58347 100644 --- a/src/ini_type.h +++ b/src/ini_type.h @@ -11,8 +11,6 @@ #define INI_TYPE_H #include "fileio_type.h" -#include -#include /** Types of groups */ enum IniGroupType { diff --git a/src/linkgraph/linkgraph_gui.h b/src/linkgraph/linkgraph_gui.h index 31cbafbb08..226cd6b265 100644 --- a/src/linkgraph/linkgraph_gui.h +++ b/src/linkgraph/linkgraph_gui.h @@ -16,7 +16,6 @@ #include "../window_gui.h" #include "linkgraph_base.h" #include -#include /** * Monthly statistics for a link between two stations. diff --git a/src/linkgraph/mcf.h b/src/linkgraph/mcf.h index e1e83e3898..a2e85243d5 100644 --- a/src/linkgraph/mcf.h +++ b/src/linkgraph/mcf.h @@ -4,7 +4,6 @@ #define MCF_H #include "linkgraphjob_base.h" -#include typedef std::vector PathVector; diff --git a/src/linkgraph/refresh.h b/src/linkgraph/refresh.h index 0202fd7239..097a3577c6 100644 --- a/src/linkgraph/refresh.h +++ b/src/linkgraph/refresh.h @@ -12,7 +12,6 @@ #include "../cargo_type.h" #include "../vehicle_base.h" -#include #include #include diff --git a/src/misc/dbg_helpers.h b/src/misc/dbg_helpers.h index b807ef25f1..a024b9dd2e 100644 --- a/src/misc/dbg_helpers.h +++ b/src/misc/dbg_helpers.h @@ -12,7 +12,6 @@ #include #include -#include #include "../direction_type.h" #include "../signal_type.h" diff --git a/src/misc/endian_buffer.hpp b/src/misc/endian_buffer.hpp index 87d527d9d8..0579a9b7f4 100644 --- a/src/misc/endian_buffer.hpp +++ b/src/misc/endian_buffer.hpp @@ -10,7 +10,6 @@ #ifndef ENDIAN_BUFFER_HPP #define ENDIAN_BUFFER_HPP -#include #include #include "../core/span_type.hpp" #include "../core/bitmath_func.hpp" diff --git a/src/misc/lrucache.hpp b/src/misc/lrucache.hpp index b0e950b2fc..2c474c2a84 100644 --- a/src/misc/lrucache.hpp +++ b/src/misc/lrucache.hpp @@ -12,9 +12,7 @@ #include #include -#include #include -#include /** * Size limited cache with a least recently used eviction strategy. diff --git a/src/music/midifile.hpp b/src/music/midifile.hpp index d786bf0078..254fda9af0 100644 --- a/src/music/midifile.hpp +++ b/src/music/midifile.hpp @@ -13,8 +13,6 @@ #include "../stdafx.h" #include "../core/smallvec_type.hpp" #include "midi.h" -#include -#include struct MusicSongInfo; diff --git a/src/music_gui.cpp b/src/music_gui.cpp index c10979041e..8e4fb39465 100644 --- a/src/music_gui.cpp +++ b/src/music_gui.cpp @@ -8,7 +8,6 @@ /** @file music_gui.cpp GUI for the music playback. */ #include "stdafx.h" -#include #include "openttd.h" #include "base_media_base.h" #include "music/music_driver.hpp" diff --git a/src/network/core/address.h b/src/network/core/address.h index f9c2eaef66..7cf159fb5e 100644 --- a/src/network/core/address.h +++ b/src/network/core/address.h @@ -16,7 +16,6 @@ #include "../../string_func.h" #include "../../core/smallmap_type.hpp" -#include class NetworkAddress; typedef std::vector NetworkAddressList; ///< Type for a list of addresses. diff --git a/src/network/core/config.cpp b/src/network/core/config.cpp index c2f4467d8e..21de508ccf 100644 --- a/src/network/core/config.cpp +++ b/src/network/core/config.cpp @@ -11,7 +11,6 @@ #include "../../stdafx.h" -#include #include "../../string_func.h" #include "../../safeguards.h" diff --git a/src/network/core/http_curl.cpp b/src/network/core/http_curl.cpp index 3781eb2d4f..4b8337b411 100644 --- a/src/network/core/http_curl.cpp +++ b/src/network/core/http_curl.cpp @@ -21,7 +21,6 @@ #include #include #include -#include #include #include diff --git a/src/network/core/packet.h b/src/network/core/packet.h index 04a232e1ca..8056ca00fa 100644 --- a/src/network/core/packet.h +++ b/src/network/core/packet.h @@ -16,8 +16,6 @@ #include "config.h" #include "core.h" #include "../../string_type.h" -#include -#include typedef uint16 PacketSize; ///< Size of the whole packet. typedef uint8 PacketType; ///< Identifier for the packet diff --git a/src/network/core/tcp_content_type.h b/src/network/core/tcp_content_type.h index 7ac64c6e35..b74271ea92 100644 --- a/src/network/core/tcp_content_type.h +++ b/src/network/core/tcp_content_type.h @@ -12,8 +12,6 @@ #ifndef NETWORK_CORE_TCP_CONTENT_TYPE_H #define NETWORK_CORE_TCP_CONTENT_TYPE_H -#include - /** The values in the enum are important; they are used as database 'keys' */ enum ContentType { CONTENT_TYPE_BEGIN = 1, ///< Helper to mark the begin of the types diff --git a/src/newgrf_class.h b/src/newgrf_class.h index 8946f84350..fe94b173c5 100644 --- a/src/newgrf_class.h +++ b/src/newgrf_class.h @@ -12,7 +12,6 @@ #include "strings_type.h" -#include /** * Struct containing information relating to NewGRF classes for stations and airports. diff --git a/src/newgrf_config.h b/src/newgrf_config.h index cc7b899ea1..db4b492a1d 100644 --- a/src/newgrf_config.h +++ b/src/newgrf_config.h @@ -17,7 +17,6 @@ #include "fileio_type.h" #include "textfile_type.h" #include "newgrf_text.h" -#include /** GRF config bit flags */ enum GCF_Flags { diff --git a/src/newgrf_profiling.h b/src/newgrf_profiling.h index f20cf62e7a..34f1d0959e 100644 --- a/src/newgrf_profiling.h +++ b/src/newgrf_profiling.h @@ -17,9 +17,6 @@ #include "newgrf_callbacks.h" #include "newgrf_spritegroup.h" -#include -#include -#include /** * Callback profiler for NewGRF development diff --git a/src/newgrf_text.h b/src/newgrf_text.h index dc33710a43..82b27a57eb 100644 --- a/src/newgrf_text.h +++ b/src/newgrf_text.h @@ -15,8 +15,6 @@ #include "core/smallvec_type.hpp" #include "table/control_codes.h" #include -#include -#include /** This character, the thorn ('รพ'), indicates a unicode string to NFO. */ static const WChar NFO_UTF8_IDENTIFIER = 0x00DE; diff --git a/src/newgrf_townname.h b/src/newgrf_townname.h index c2fc94a53b..df72656d84 100644 --- a/src/newgrf_townname.h +++ b/src/newgrf_townname.h @@ -13,7 +13,6 @@ #ifndef NEWGRF_TOWNNAME_H #define NEWGRF_TOWNNAME_H -#include #include "strings_type.h" struct NamePart { diff --git a/src/os/macosx/font_osx.cpp b/src/os/macosx/font_osx.cpp index 7a46d8f3b1..521e766024 100644 --- a/src/os/macosx/font_osx.cpp +++ b/src/os/macosx/font_osx.cpp @@ -18,7 +18,6 @@ #include "../../strings_func.h" #include "../../zoom_func.h" #include "macos.h" -#include #include "../../table/control_codes.h" diff --git a/src/os/macosx/string_osx.cpp b/src/os/macosx/string_osx.cpp index 206baf7580..f089c630c5 100644 --- a/src/os/macosx/string_osx.cpp +++ b/src/os/macosx/string_osx.cpp @@ -15,7 +15,6 @@ #include "../../fontcache.h" #include "../../zoom_func.h" #include "macos.h" -#include #include diff --git a/src/os/macosx/string_osx.h b/src/os/macosx/string_osx.h index 3e29b16f5c..bd6abd6d10 100644 --- a/src/os/macosx/string_osx.h +++ b/src/os/macosx/string_osx.h @@ -12,7 +12,6 @@ #include "../../gfx_layout.h" #include "../../string_base.h" -#include /** String iterator using CoreText as a backend. */ class OSXStringIterator : public StringIterator { diff --git a/src/os/windows/string_uniscribe.cpp b/src/os/windows/string_uniscribe.cpp index 672c2dcd3d..47975af7ad 100644 --- a/src/os/windows/string_uniscribe.cpp +++ b/src/os/windows/string_uniscribe.cpp @@ -16,7 +16,6 @@ #include "../../table/control_codes.h" #include "../../zoom_func.h" #include "win32.h" -#include #include #include diff --git a/src/os/windows/string_uniscribe.h b/src/os/windows/string_uniscribe.h index 7ec7ca6708..e5fc0a6c59 100644 --- a/src/os/windows/string_uniscribe.h +++ b/src/os/windows/string_uniscribe.h @@ -12,7 +12,6 @@ #include "../../gfx_layout.h" #include "../../string_base.h" -#include void UniscribeResetScriptCache(FontSize size); diff --git a/src/pathfinder/yapf/yapf_costrail.hpp b/src/pathfinder/yapf/yapf_costrail.hpp index 908814c8cd..042ccf9275 100644 --- a/src/pathfinder/yapf/yapf_costrail.hpp +++ b/src/pathfinder/yapf/yapf_costrail.hpp @@ -10,7 +10,6 @@ #ifndef YAPF_COSTRAIL_HPP #define YAPF_COSTRAIL_HPP -#include #include "../../pbs.h" diff --git a/src/random_access_file_type.h b/src/random_access_file_type.h index ce0e9e3584..8e66cf0f69 100644 --- a/src/random_access_file_type.h +++ b/src/random_access_file_type.h @@ -11,7 +11,6 @@ #define RANDOM_ACCESS_FILE_TYPE_H #include "fileio_type.h" -#include /** * A file from which bytes, words and double words are read in (potentially) a random order. diff --git a/src/road.h b/src/road.h index 936566c879..a9ff16f656 100644 --- a/src/road.h +++ b/src/road.h @@ -19,7 +19,6 @@ #include "newgrf.h" #include "economy_func.h" -#include enum RoadTramType : bool { RTT_ROAD, diff --git a/src/saveload/engine_sl.cpp b/src/saveload/engine_sl.cpp index 52afe8b015..f5efe9f753 100644 --- a/src/saveload/engine_sl.cpp +++ b/src/saveload/engine_sl.cpp @@ -15,7 +15,6 @@ #include "saveload_internal.h" #include "../engine_base.h" #include "../string_func.h" -#include #include "../safeguards.h" diff --git a/src/saveload/oldloader.cpp b/src/saveload/oldloader.cpp index a6f2d55cee..6f11d17c28 100644 --- a/src/saveload/oldloader.cpp +++ b/src/saveload/oldloader.cpp @@ -19,7 +19,6 @@ #include "saveload_internal.h" #include "oldloader.h" -#include #include "../safeguards.h" diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp index 2db6efa1ae..7221b7d779 100644 --- a/src/saveload/saveload.cpp +++ b/src/saveload/saveload.cpp @@ -44,8 +44,6 @@ #include "../error.h" #include #include -#include -#include #ifdef __EMSCRIPTEN__ # include #endif diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h index a00171abd7..1f07c1bb99 100644 --- a/src/saveload/saveload.h +++ b/src/saveload/saveload.h @@ -14,9 +14,6 @@ #include "../fileio_type.h" #include "../fios.h" #include "../core/span_type.hpp" -#include -#include -#include /** SaveLoad versions * Previous savegame versions, the trunk revision where they were diff --git a/src/script/api/script_admin.hpp b/src/script/api/script_admin.hpp index 95b7218eb0..b96b58abf2 100644 --- a/src/script/api/script_admin.hpp +++ b/src/script/api/script_admin.hpp @@ -10,7 +10,6 @@ #ifndef SCRIPT_ADMIN_HPP #define SCRIPT_ADMIN_HPP -#include #include "script_object.hpp" /** diff --git a/src/script/api/script_priorityqueue.hpp b/src/script/api/script_priorityqueue.hpp index ac4bbfa6f0..43c173b350 100644 --- a/src/script/api/script_priorityqueue.hpp +++ b/src/script/api/script_priorityqueue.hpp @@ -13,7 +13,6 @@ #include "script_object.hpp" #include -#include /** * Class that creates a queue which keeps its items ordered by an item priority. diff --git a/src/script/script_storage.hpp b/src/script/script_storage.hpp index b7a16dcb15..626c62f025 100644 --- a/src/script/script_storage.hpp +++ b/src/script/script_storage.hpp @@ -20,7 +20,6 @@ #include "script_log_types.hpp" #include "table/strings.h" -#include /** * The callback function for Mode-classes. diff --git a/src/script/squirrel_helper_type.hpp b/src/script/squirrel_helper_type.hpp index 05f3824fd9..3cb2c2a142 100644 --- a/src/script/squirrel_helper_type.hpp +++ b/src/script/squirrel_helper_type.hpp @@ -10,7 +10,6 @@ #ifndef SQUIRREL_HELPER_TYPE_HPP #define SQUIRREL_HELPER_TYPE_HPP -#include /** Definition of a simple array. */ template diff --git a/src/settings_gui.cpp b/src/settings_gui.cpp index 70494b3849..af0c90e17b 100644 --- a/src/settings_gui.cpp +++ b/src/settings_gui.cpp @@ -42,8 +42,6 @@ #include "gui.h" #include "mixer.h" -#include -#include #include "safeguards.h" #include "video/video_driver.hpp" diff --git a/src/signs_base.h b/src/signs_base.h index 795f3b8e58..2791afa8a0 100644 --- a/src/signs_base.h +++ b/src/signs_base.h @@ -14,7 +14,6 @@ #include "viewport_type.h" #include "core/pool_type.hpp" #include "company_type.h" -#include typedef Pool SignPool; extern SignPool _sign_pool; diff --git a/src/station_gui.cpp b/src/station_gui.cpp index e206aec033..13c4fb469b 100644 --- a/src/station_gui.cpp +++ b/src/station_gui.cpp @@ -38,7 +38,6 @@ #include "table/strings.h" #include -#include #include "safeguards.h" diff --git a/src/station_gui.h b/src/station_gui.h index 9bed30b672..503f2f88ab 100644 --- a/src/station_gui.h +++ b/src/station_gui.h @@ -14,7 +14,6 @@ #include "tilearea_type.h" #include "window_type.h" #include "station_type.h" -#include /** Types of cargo to display for station coverage. */ diff --git a/src/stdafx.h b/src/stdafx.h index cfbf724bf6..bb803d74cf 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -53,15 +53,28 @@ #endif #include -#include -#include +#include +#include +#include +#include +#include +#include #include +#include +#include #include #include -#include -#include +#include +#include +#include +#include +#include #include +#include +#include #include +#include +#include #if defined(UNIX) || defined(__MINGW32__) # include diff --git a/src/strgen/strgen.cpp b/src/strgen/strgen.cpp index a52b6c20ed..bd32b4f352 100644 --- a/src/strgen/strgen.cpp +++ b/src/strgen/strgen.cpp @@ -17,7 +17,6 @@ #include "strgen.h" -#include #if !defined(_WIN32) || defined(__CYGWIN__) #include diff --git a/src/string_type.h b/src/string_type.h index b8705e403f..4483b7474c 100644 --- a/src/string_type.h +++ b/src/string_type.h @@ -11,8 +11,6 @@ #define STRING_TYPE_H #include "core/enum_type.hpp" -#include -#include /** A non-breaking space. */ #define NBSP u8"\u00a0" diff --git a/src/tar_type.h b/src/tar_type.h index 4266f23623..56f6224fcc 100644 --- a/src/tar_type.h +++ b/src/tar_type.h @@ -11,7 +11,6 @@ #define TAR_TYPE_H #include -#include #include #include "fileio_type.h" diff --git a/src/textfile_gui.h b/src/textfile_gui.h index d7d0a8391d..5e0a7180f7 100644 --- a/src/textfile_gui.h +++ b/src/textfile_gui.h @@ -14,7 +14,6 @@ #include "strings_func.h" #include "textfile_type.h" #include "window_gui.h" -#include std::optional GetTextfile(TextfileType type, Subdirectory dir, const std::string &filename); diff --git a/src/timer/timer.h b/src/timer/timer.h index 3c45df55a9..d49d60aaff 100644 --- a/src/timer/timer.h +++ b/src/timer/timer.h @@ -12,7 +12,6 @@ #include "timer_manager.h" -#include /** * The base where every other type of timer is derived from. diff --git a/src/timetable_gui.cpp b/src/timetable_gui.cpp index 40106e8a65..0d2207aefd 100644 --- a/src/timetable_gui.cpp +++ b/src/timetable_gui.cpp @@ -24,7 +24,6 @@ #include "settings_type.h" #include "timetable_cmd.h" #include "timetable.h" -#include #include "widgets/timetable_widget.h" diff --git a/src/townname_type.h b/src/townname_type.h index 2dc23567f0..45290bc046 100644 --- a/src/townname_type.h +++ b/src/townname_type.h @@ -17,7 +17,6 @@ #include "town_type.h" #include "string_type.h" #include -#include typedef std::set TownNames; diff --git a/src/vehicle_gui_base.h b/src/vehicle_gui_base.h index dec9c9b1d6..8e6c272448 100644 --- a/src/vehicle_gui_base.h +++ b/src/vehicle_gui_base.h @@ -20,7 +20,6 @@ #include "window_gui.h" #include "widgets/dropdown_type.h" -#include #include typedef GUIList GUIVehicleList; diff --git a/src/video/video_driver.hpp b/src/video/video_driver.hpp index b81ec6e2fb..27e1dcc976 100644 --- a/src/video/video_driver.hpp +++ b/src/video/video_driver.hpp @@ -21,8 +21,6 @@ #include #include #include -#include -#include extern std::string _ini_videodriver; extern std::vector _resolutions; diff --git a/src/window_gui.h b/src/window_gui.h index cf9f542cff..253292455d 100644 --- a/src/window_gui.h +++ b/src/window_gui.h @@ -11,8 +11,6 @@ #define WINDOW_GUI_H #include -#include -#include #include "vehiclelist.h" #include "vehicle_type.h"