From 86841ba1f0dd0a25b3a8db984a6189e9a74a752d Mon Sep 17 00:00:00 2001 From: Patric Stout Date: Sun, 9 Feb 2025 20:43:15 +0100 Subject: [PATCH] Codechange: no longer add "src" to the include-path (#13511) --- CMakeLists.txt | 2 -- src/game/game_text.cpp | 2 +- src/network/core/os_abstraction.cpp | 2 +- src/network/network_survey.cpp | 2 +- src/os/macosx/font_osx.cpp | 2 +- src/os/macosx/font_osx.h | 2 +- src/os/unix/font_unix.cpp | 2 +- src/os/windows/font_win32.cpp | 4 ++-- src/pathfinder/water_regions.cpp | 18 +++++++++--------- src/pathfinder/water_regions.h | 4 ++-- src/rev.cpp.in | 8 ++++---- src/saveload/afterload.cpp | 2 +- src/table/airport_defaults.h | 2 +- src/video/cocoa/cocoa_wnd.mm | 2 +- 14 files changed, 26 insertions(+), 28 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ca52d48f53..6dd5d9d172 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -231,8 +231,6 @@ endif() include(CTest) include(SourceList) -# Needed by rev.cpp -include_directories(${CMAKE_SOURCE_DIR}/src) # Needed by everything that uses Squirrel include_directories(${CMAKE_SOURCE_DIR}/src/3rdparty/squirrel/include) diff --git a/src/game/game_text.cpp b/src/game/game_text.cpp index 8278da2663..bf8192ed97 100644 --- a/src/game/game_text.cpp +++ b/src/game/game_text.cpp @@ -19,7 +19,7 @@ #include "game_info.hpp" #include "table/strings.h" -#include "table/strgen_tables.h" +#include "../table/strgen_tables.h" #include "../safeguards.h" diff --git a/src/network/core/os_abstraction.cpp b/src/network/core/os_abstraction.cpp index 023fe5b116..41d5471b72 100644 --- a/src/network/core/os_abstraction.cpp +++ b/src/network/core/os_abstraction.cpp @@ -16,7 +16,7 @@ * that the behaviour is usually Unix/BSD-like with occasional variation. */ -#include "stdafx.h" +#include "../../stdafx.h" #include "os_abstraction.h" #include "../../string_func.h" #include "../../3rdparty/fmt/format.h" diff --git a/src/network/network_survey.cpp b/src/network/network_survey.cpp index 9bdddc40c2..040db1fe48 100644 --- a/src/network/network_survey.cpp +++ b/src/network/network_survey.cpp @@ -9,7 +9,7 @@ #include "../stdafx.h" #include "network_survey.h" -#include "settings_table.h" +#include "../settings_table.h" #include "network.h" #include "network_func.h" #include "../debug.h" diff --git a/src/os/macosx/font_osx.cpp b/src/os/macosx/font_osx.cpp index 631b43fba1..829c0c2607 100644 --- a/src/os/macosx/font_osx.cpp +++ b/src/os/macosx/font_osx.cpp @@ -22,7 +22,7 @@ #include "../../table/control_codes.h" -#include "safeguards.h" +#include "../../safeguards.h" bool SetFallbackFont(FontCacheSettings *settings, const std::string &language_isocode, MissingGlyphSearcher *callback) { diff --git a/src/os/macosx/font_osx.h b/src/os/macosx/font_osx.h index d2ba5f3b3f..ac729abd2d 100644 --- a/src/os/macosx/font_osx.h +++ b/src/os/macosx/font_osx.h @@ -11,7 +11,7 @@ #define FONT_OSX_H #include "../../fontcache/truetypefontcache.h" -#include "os/macosx/macos.h" +#include "macos.h" #include diff --git a/src/os/unix/font_unix.cpp b/src/os/unix/font_unix.cpp index 207c248f98..efaaa3e056 100644 --- a/src/os/unix/font_unix.cpp +++ b/src/os/unix/font_unix.cpp @@ -15,7 +15,7 @@ #include -#include "safeguards.h" +#include "../../safeguards.h" #include #include FT_FREETYPE_H diff --git a/src/os/windows/font_win32.cpp b/src/os/windows/font_win32.cpp index 8c4f20069a..db1573d20a 100644 --- a/src/os/windows/font_win32.cpp +++ b/src/os/windows/font_win32.cpp @@ -27,10 +27,10 @@ #include #include /* SHGetFolderPath */ -#include "os/windows/win32.h" +#include "win32.h" #undef small // Say what, Windows? -#include "safeguards.h" +#include "../../safeguards.h" struct EFCParam { FontCacheSettings *settings; diff --git a/src/pathfinder/water_regions.cpp b/src/pathfinder/water_regions.cpp index 666a1d2734..00b6bae494 100644 --- a/src/pathfinder/water_regions.cpp +++ b/src/pathfinder/water_regions.cpp @@ -7,17 +7,17 @@ /** @file water_regions.cpp Handles dividing the water in the map into square regions to assist pathfinding. */ -#include "stdafx.h" -#include "map_func.h" +#include "../stdafx.h" +#include "../map_func.h" #include "water_regions.h" -#include "tilearea_type.h" -#include "track_func.h" -#include "transport_type.h" -#include "landscape.h" -#include "tunnelbridge_map.h" +#include "../tilearea_type.h" +#include "../track_func.h" +#include "../transport_type.h" +#include "../landscape.h" +#include "../tunnelbridge_map.h" #include "follow_track.hpp" -#include "ship.h" -#include "debug.h" +#include "../ship.h" +#include "../debug.h" using TWaterRegionTraversabilityBits = uint16_t; constexpr TWaterRegionPatchLabel FIRST_REGION_LABEL = 1; diff --git a/src/pathfinder/water_regions.h b/src/pathfinder/water_regions.h index 9364b2e1eb..c116ff1a3f 100644 --- a/src/pathfinder/water_regions.h +++ b/src/pathfinder/water_regions.h @@ -10,8 +10,8 @@ #ifndef WATER_REGIONS_H #define WATER_REGIONS_H -#include "tile_type.h" -#include "map_func.h" +#include "../tile_type.h" +#include "../map_func.h" using TWaterRegionPatchLabel = uint8_t; using TWaterRegionIndex = uint; diff --git a/src/rev.cpp.in b/src/rev.cpp.in index 50e2ee0347..4ccd03eca2 100644 --- a/src/rev.cpp.in +++ b/src/rev.cpp.in @@ -7,11 +7,11 @@ /** @file rev.cpp Autogenerated file with the revision and such of OpenTTD. */ -#include "stdafx.h" -#include "core/bitmath_func.hpp" -#include "rev.h" +#include "${CMAKE_SOURCE_DIR}/src/stdafx.h" +#include "${CMAKE_SOURCE_DIR}/src/core/bitmath_func.hpp" +#include "${CMAKE_SOURCE_DIR}/src/rev.h" -#include "safeguards.h" +#include "${CMAKE_SOURCE_DIR}/src/safeguards.h" /** * Is this version of OpenTTD a release version? diff --git a/src/saveload/afterload.cpp b/src/saveload/afterload.cpp index ccf60c4777..53a4705e5a 100644 --- a/src/saveload/afterload.cpp +++ b/src/saveload/afterload.cpp @@ -69,7 +69,7 @@ #include #include "../safeguards.h" -#include "window_func.h" +#include "../window_func.h" extern Company *DoStartupNewCompany(bool is_ai, CompanyID company = INVALID_COMPANY); diff --git a/src/table/airport_defaults.h b/src/table/airport_defaults.h index a1ef8ae2ad..b683f1210a 100644 --- a/src/table/airport_defaults.h +++ b/src/table/airport_defaults.h @@ -10,7 +10,7 @@ #ifndef AIRPORT_DEFAULTS_H #define AIRPORT_DEFAULTS_H -#include "timer/timer_game_calendar.h" +#include "../timer/timer_game_calendar.h" /** * Definition of an airport tiles layout. diff --git a/src/video/cocoa/cocoa_wnd.mm b/src/video/cocoa/cocoa_wnd.mm index 81b547aec4..38e7b720ed 100644 --- a/src/video/cocoa/cocoa_wnd.mm +++ b/src/video/cocoa/cocoa_wnd.mm @@ -35,7 +35,7 @@ #include "../../textbuf_type.h" #include "../../toolbar_gui.h" -#include "table/sprites.h" +#include "../../table/sprites.h" /* Table data for key mapping. */ #include "cocoa_keys.h"