Changeset - r27283:895ef9174a75
[Not reviewed]
master
! ! !
Rubidium - 12 months ago 2023-05-07 19:54:36
rubidium@openttd.org
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.
70 files changed with 17 insertions and 94 deletions:
0 comments (0 inline, 0 general)
src/base_consist.h
Show inline comments
 
@@ -12,7 +12,6 @@
 

	
 
#include "order_type.h"
 
#include "timer/timer_game_calendar.h"
 
#include <string>
 

	
 
/** Various front vehicle properties that are preserved when autoreplacing, using order-backup or switching front engines within a consist. */
 
struct BaseConsist {
src/bitmap_type.h
Show inline comments
 
@@ -10,7 +10,6 @@
 
#ifndef BITMAP_TYPE_HPP
 
#define BITMAP_TYPE_HPP
 

	
 
#include <vector>
 

	
 
/** Represents a tile area containing containing individually set tiles.
 
 * Each tile must be contained within the preallocated area.
src/cargotype.h
Show inline comments
 
@@ -17,7 +17,6 @@
 
#include "landscape_type.h"
 
#include "core/bitmath_func.hpp"
 
#include "core/span_type.hpp"
 
#include <vector>
 

	
 
/** Globally unique label of a cargo type. */
 
typedef uint32 CargoLabel;
src/command_type.h
Show inline comments
 
@@ -13,7 +13,6 @@
 
#include "economy_type.h"
 
#include "strings_type.h"
 
#include "tile_type.h"
 
#include <vector>
 

	
 
struct GRFFile;
 

	
src/company_base.h
Show inline comments
 
@@ -17,7 +17,6 @@
 
#include "timer/timer_game_calendar.h"
 
#include "settings_type.h"
 
#include "group.h"
 
#include <string>
 
#include <array>
 

	
 
/** Statistics about the economy. */
src/console_gui.cpp
Show inline comments
 
@@ -23,7 +23,6 @@
 
#include "timer/timer.h"
 
#include "timer/timer_window.h"
 
#include <deque>
 
#include <string>
 

	
 
#include "widgets/console_widget.h"
 

	
src/core/kdtree.hpp
Show inline comments
 
@@ -11,8 +11,6 @@
 
#define KDTREE_HPP
 

	
 
#include "../stdafx.h"
 
#include <vector>
 
#include <limits>
 

	
 
/**
 
 * K-dimensional tree, specialised for 2-dimensional space.
src/core/math_func.hpp
Show inline comments
 
@@ -10,8 +10,6 @@
 
#ifndef MATH_FUNC_HPP
 
#define MATH_FUNC_HPP
 

	
 
#include <limits>
 
#include <type_traits>
 

	
 
/**
 
 * Returns the absolute value of (scalar) variable.
src/core/overflowsafe_type.hpp
Show inline comments
 
@@ -12,7 +12,6 @@
 

	
 
#include "math_func.hpp"
 

	
 
#include <limits>
 

	
 
#ifdef __has_builtin
 
#	if __has_builtin(__builtin_add_overflow) && __has_builtin(__builtin_sub_overflow) && __has_builtin(__builtin_mul_overflow)
src/core/smallvec_type.hpp
Show inline comments
 
@@ -11,7 +11,6 @@
 
#define SMALLVEC_TYPE_HPP
 

	
 
#include "mem_func.hpp"
 
#include <vector>
 

	
 
/**
 
 * Helper function to append an item to a vector if it is not already contained
src/dedicated.cpp
Show inline comments
 
@@ -10,7 +10,6 @@
 
#include "stdafx.h"
 
#include "fileio_func.h"
 
#include "debug.h"
 
#include <string>
 

	
 
std::string _log_file; ///< File to reroute output of a forked OpenTTD to
 
std::unique_ptr<FILE, FileDeleter> _log_fd; ///< File to reroute output of a forked OpenTTD to
src/driver.cpp
Show inline comments
 
@@ -16,7 +16,6 @@
 
#include "video/video_driver.hpp"
 
#include "string_func.h"
 
#include "table/strings.h"
 
#include <string>
 
#include <sstream>
 

	
 
#include "safeguards.h"
src/fileio_func.h
Show inline comments
 
@@ -12,8 +12,6 @@
 

	
 
#include "core/enum_type.hpp"
 
#include "fileio_type.h"
 
#include <string>
 
#include <vector>
 

	
 
void FioFCloseFile(FILE *f);
 
FILE *FioFOpenFile(const std::string &filename, const char *mode, Subdirectory subdir, size_t *filesize = nullptr);
src/fios.cpp
Show inline comments
 
@@ -20,8 +20,6 @@
 
#include "strings_func.h"
 
#include "tar_type.h"
 
#include <sys/stat.h>
 
#include <functional>
 
#include <optional>
 
#include <charconv>
 

	
 
#ifndef _WIN32
src/framerate_gui.cpp
Show inline comments
 
@@ -29,7 +29,6 @@
 

	
 
#include <atomic>
 
#include <mutex>
 
#include <vector>
 

	
 
#include "safeguards.h"
 

	
src/game/game_text.cpp
Show inline comments
 
@@ -22,7 +22,6 @@
 
#include "table/strgen_tables.h"
 

	
 
#include <stdarg.h>
 
#include <memory>
 

	
 
#include "../safeguards.h"
 

	
src/gamelog.h
Show inline comments
 
@@ -10,7 +10,6 @@
 
#ifndef GAMELOG_H
 
#define GAMELOG_H
 

	
 
#include <functional>
 
#include "newgrf_config.h"
 

	
 
/** The actions we log. */
src/gfx_layout.h
Show inline comments
 
@@ -15,11 +15,8 @@
 
#include "core/smallmap_type.hpp"
 

	
 
#include <map>
 
#include <string>
 
#include <stack>
 
#include <string_view>
 
#include <type_traits>
 
#include <vector>
 

	
 
/**
 
 * Text drawing parameters, which can change while drawing a line, but are kept between multiple parts
src/group.h
Show inline comments
 
@@ -16,7 +16,6 @@
 
#include "vehicle_type.h"
 
#include "engine_type.h"
 
#include "livery.h"
 
#include <string>
 

	
 
typedef Pool<Group, GroupID, 16, 64000> GroupPool;
 
extern GroupPool _group_pool; ///< Pool of groups.
src/industrytype.h
Show inline comments
 
@@ -11,7 +11,6 @@
 
#define INDUSTRYTYPE_H
 

	
 
#include <array>
 
#include <vector>
 
#include "map_type.h"
 
#include "slope_type.h"
 
#include "industry_type.h"
src/ini_type.h
Show inline comments
 
@@ -11,8 +11,6 @@
 
#define INI_TYPE_H
 

	
 
#include "fileio_type.h"
 
#include <string>
 
#include <optional>
 

	
 
/** Types of groups */
 
enum IniGroupType {
src/linkgraph/linkgraph_gui.h
Show inline comments
 
@@ -16,7 +16,6 @@
 
#include "../window_gui.h"
 
#include "linkgraph_base.h"
 
#include <map>
 
#include <vector>
 

	
 
/**
 
 * Monthly statistics for a link between two stations.
src/linkgraph/mcf.h
Show inline comments
 
@@ -4,7 +4,6 @@
 
#define MCF_H
 

	
 
#include "linkgraphjob_base.h"
 
#include <vector>
 

	
 
typedef std::vector<Path *> PathVector;
 

	
src/linkgraph/refresh.h
Show inline comments
 
@@ -12,7 +12,6 @@
 

	
 
#include "../cargo_type.h"
 
#include "../vehicle_base.h"
 
#include <vector>
 
#include <map>
 
#include <set>
 

	
src/misc/dbg_helpers.h
Show inline comments
 
@@ -12,7 +12,6 @@
 

	
 
#include <map>
 
#include <stack>
 
#include <string>
 

	
 
#include "../direction_type.h"
 
#include "../signal_type.h"
src/misc/endian_buffer.hpp
Show inline comments
 
@@ -10,7 +10,6 @@
 
#ifndef ENDIAN_BUFFER_HPP
 
#define ENDIAN_BUFFER_HPP
 

	
 
#include <iterator>
 
#include <string_view>
 
#include "../core/span_type.hpp"
 
#include "../core/bitmath_func.hpp"
src/misc/lrucache.hpp
Show inline comments
 
@@ -12,9 +12,7 @@
 

	
 
#include <utility>
 
#include <list>
 
#include <functional>
 
#include <unordered_map>
 
#include <stdexcept>
 

	
 
/**
 
 * Size limited cache with a least recently used eviction strategy.
src/music/midifile.hpp
Show inline comments
 
@@ -13,8 +13,6 @@
 
#include "../stdafx.h"
 
#include "../core/smallvec_type.hpp"
 
#include "midi.h"
 
#include <vector>
 
#include <string>
 

	
 
struct MusicSongInfo;
 

	
src/music_gui.cpp
Show inline comments
 
@@ -8,7 +8,6 @@
 
/** @file music_gui.cpp GUI for the music playback. */
 

	
 
#include "stdafx.h"
 
#include <vector>
 
#include "openttd.h"
 
#include "base_media_base.h"
 
#include "music/music_driver.hpp"
src/network/core/address.h
Show inline comments
 
@@ -16,7 +16,6 @@
 
#include "../../string_func.h"
 
#include "../../core/smallmap_type.hpp"
 

	
 
#include <string>
 

	
 
class NetworkAddress;
 
typedef std::vector<NetworkAddress> NetworkAddressList; ///< Type for a list of addresses.
src/network/core/config.cpp
Show inline comments
 
@@ -11,7 +11,6 @@
 

	
 
#include "../../stdafx.h"
 

	
 
#include <cstdlib>
 
#include "../../string_func.h"
 

	
 
#include "../../safeguards.h"
src/network/core/http_curl.cpp
Show inline comments
 
@@ -21,7 +21,6 @@
 
#include <atomic>
 
#include <condition_variable>
 
#include <curl/curl.h>
 
#include <memory>
 
#include <mutex>
 
#include <queue>
 

	
src/network/core/packet.h
Show inline comments
 
@@ -16,8 +16,6 @@
 
#include "config.h"
 
#include "core.h"
 
#include "../../string_type.h"
 
#include <functional>
 
#include <limits>
 

	
 
typedef uint16 PacketSize; ///< Size of the whole packet.
 
typedef uint8  PacketType; ///< Identifier for the packet
src/network/core/tcp_content_type.h
Show inline comments
 
@@ -12,8 +12,6 @@
 
#ifndef NETWORK_CORE_TCP_CONTENT_TYPE_H
 
#define NETWORK_CORE_TCP_CONTENT_TYPE_H
 

	
 
#include <optional>
 

	
 
/** 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
src/newgrf_class.h
Show inline comments
 
@@ -12,7 +12,6 @@
 

	
 
#include "strings_type.h"
 

	
 
#include <vector>
 

	
 
/**
 
 * Struct containing information relating to NewGRF classes for stations and airports.
src/newgrf_config.h
Show inline comments
 
@@ -17,7 +17,6 @@
 
#include "fileio_type.h"
 
#include "textfile_type.h"
 
#include "newgrf_text.h"
 
#include <optional>
 

	
 
/** GRF config bit flags */
 
enum GCF_Flags {
src/newgrf_profiling.h
Show inline comments
 
@@ -17,9 +17,6 @@
 
#include "newgrf_callbacks.h"
 
#include "newgrf_spritegroup.h"
 

	
 
#include <vector>
 
#include <string>
 
#include <memory>
 

	
 
/**
 
 * Callback profiler for NewGRF development
src/newgrf_text.h
Show inline comments
 
@@ -15,8 +15,6 @@
 
#include "core/smallvec_type.hpp"
 
#include "table/control_codes.h"
 
#include <utility>
 
#include <vector>
 
#include <string>
 

	
 
/** This character, the thorn ('þ'), indicates a unicode string to NFO. */
 
static const WChar NFO_UTF8_IDENTIFIER = 0x00DE;
src/newgrf_townname.h
Show inline comments
 
@@ -13,7 +13,6 @@
 
#ifndef NEWGRF_TOWNNAME_H
 
#define NEWGRF_TOWNNAME_H
 

	
 
#include <vector>
 
#include "strings_type.h"
 

	
 
struct NamePart {
src/os/macosx/font_osx.cpp
Show inline comments
 
@@ -18,7 +18,6 @@
 
#include "../../strings_func.h"
 
#include "../../zoom_func.h"
 
#include "macos.h"
 
#include <cmath>
 

	
 
#include "../../table/control_codes.h"
 

	
src/os/macosx/string_osx.cpp
Show inline comments
 
@@ -15,7 +15,6 @@
 
#include "../../fontcache.h"
 
#include "../../zoom_func.h"
 
#include "macos.h"
 
#include <cmath>
 

	
 
#include <CoreFoundation/CoreFoundation.h>
 

	
src/os/macosx/string_osx.h
Show inline comments
 
@@ -12,7 +12,6 @@
 

	
 
#include "../../gfx_layout.h"
 
#include "../../string_base.h"
 
#include <vector>
 

	
 
/** String iterator using CoreText as a backend. */
 
class OSXStringIterator : public StringIterator {
src/os/windows/string_uniscribe.cpp
Show inline comments
 
@@ -16,7 +16,6 @@
 
#include "../../table/control_codes.h"
 
#include "../../zoom_func.h"
 
#include "win32.h"
 
#include <vector>
 

	
 
#include <windows.h>
 
#include <usp10.h>
src/os/windows/string_uniscribe.h
Show inline comments
 
@@ -12,7 +12,6 @@
 

	
 
#include "../../gfx_layout.h"
 
#include "../../string_base.h"
 
#include <vector>
 

	
 

	
 
void UniscribeResetScriptCache(FontSize size);
src/pathfinder/yapf/yapf_costrail.hpp
Show inline comments
 
@@ -10,7 +10,6 @@
 
#ifndef YAPF_COSTRAIL_HPP
 
#define YAPF_COSTRAIL_HPP
 

	
 
#include <vector>
 

	
 
#include "../../pbs.h"
 

	
src/random_access_file_type.h
Show inline comments
 
@@ -11,7 +11,6 @@
 
#define RANDOM_ACCESS_FILE_TYPE_H
 

	
 
#include "fileio_type.h"
 
#include <string>
 

	
 
/**
 
 * A file from which bytes, words and double words are read in (potentially) a random order.
src/road.h
Show inline comments
 
@@ -19,7 +19,6 @@
 
#include "newgrf.h"
 
#include "economy_func.h"
 

	
 
#include <vector>
 

	
 
enum RoadTramType : bool {
 
	RTT_ROAD,
src/saveload/engine_sl.cpp
Show inline comments
 
@@ -15,7 +15,6 @@
 
#include "saveload_internal.h"
 
#include "../engine_base.h"
 
#include "../string_func.h"
 
#include <vector>
 

	
 
#include "../safeguards.h"
 

	
src/saveload/oldloader.cpp
Show inline comments
 
@@ -19,7 +19,6 @@
 
#include "saveload_internal.h"
 
#include "oldloader.h"
 

	
 
#include <exception>
 

	
 
#include "../safeguards.h"
 

	
src/saveload/saveload.cpp
Show inline comments
 
@@ -44,8 +44,6 @@
 
#include "../error.h"
 
#include <atomic>
 
#include <deque>
 
#include <vector>
 
#include <string>
 
#ifdef __EMSCRIPTEN__
 
#	include <emscripten.h>
 
#endif
src/saveload/saveload.h
Show inline comments
 
@@ -14,9 +14,6 @@
 
#include "../fileio_type.h"
 
#include "../fios.h"
 
#include "../core/span_type.hpp"
 
#include <optional>
 
#include <string>
 
#include <vector>
 

	
 
/** SaveLoad versions
 
 * Previous savegame versions, the trunk revision where they were
src/script/api/script_admin.hpp
Show inline comments
 
@@ -10,7 +10,6 @@
 
#ifndef SCRIPT_ADMIN_HPP
 
#define SCRIPT_ADMIN_HPP
 

	
 
#include <string>
 
#include "script_object.hpp"
 

	
 
/**
src/script/api/script_priorityqueue.hpp
Show inline comments
 
@@ -13,7 +13,6 @@
 

	
 
#include "script_object.hpp"
 
#include <utility>
 
#include <vector>
 

	
 
/**
 
 * Class that creates a queue which keeps its items ordered by an item priority.
src/script/script_storage.hpp
Show inline comments
 
@@ -20,7 +20,6 @@
 
#include "script_log_types.hpp"
 

	
 
#include "table/strings.h"
 
#include <vector>
 

	
 
/**
 
 * The callback function for Mode-classes.
src/script/squirrel_helper_type.hpp
Show inline comments
 
@@ -10,7 +10,6 @@
 
#ifndef SQUIRREL_HELPER_TYPE_HPP
 
#define SQUIRREL_HELPER_TYPE_HPP
 

	
 
#include <vector>
 

	
 
/** Definition of a simple array. */
 
template <typename Titem = int32>
src/settings_gui.cpp
Show inline comments
 
@@ -42,8 +42,6 @@
 
#include "gui.h"
 
#include "mixer.h"
 

	
 
#include <vector>
 
#include <iterator>
 

	
 
#include "safeguards.h"
 
#include "video/video_driver.hpp"
src/signs_base.h
Show inline comments
 
@@ -14,7 +14,6 @@
 
#include "viewport_type.h"
 
#include "core/pool_type.hpp"
 
#include "company_type.h"
 
#include <string>
 

	
 
typedef Pool<Sign, SignID, 16, 64000> SignPool;
 
extern SignPool _sign_pool;
src/station_gui.cpp
Show inline comments
 
@@ -38,7 +38,6 @@
 
#include "table/strings.h"
 

	
 
#include <set>
 
#include <vector>
 

	
 
#include "safeguards.h"
 

	
src/station_gui.h
Show inline comments
 
@@ -14,7 +14,6 @@
 
#include "tilearea_type.h"
 
#include "window_type.h"
 
#include "station_type.h"
 
#include <functional>
 

	
 

	
 
/** Types of cargo to display for station coverage. */
src/stdafx.h
Show inline comments
 
@@ -53,15 +53,28 @@
 
#endif
 

	
 
#include <algorithm>
 
#include <cstdio>
 
#include <cassert>
 
#include <cctype>
 
#include <cerrno>
 
#include <climits>
 
#include <cmath>
 
#include <cstdarg>
 
#include <cstddef>
 
#include <cstdint>
 
#include <cstddef>
 
#include <cstdio>
 
#include <cstring>
 
#include <cstdlib>
 
#include <climits>
 
#include <cassert>
 
#include <cwchar>
 
#include <exception>
 
#include <functional>
 
#include <iterator>
 
#include <limits>
 
#include <memory>
 
#include <optional>
 
#include <stdexcept>
 
#include <string>
 
#include <type_traits>
 
#include <vector>
 

	
 
#if defined(UNIX) || defined(__MINGW32__)
 
#	include <sys/types.h>
src/strgen/strgen.cpp
Show inline comments
 
@@ -17,7 +17,6 @@
 

	
 
#include "strgen.h"
 

	
 
#include <exception>
 

	
 
#if !defined(_WIN32) || defined(__CYGWIN__)
 
#include <unistd.h>
src/string_type.h
Show inline comments
 
@@ -11,8 +11,6 @@
 
#define STRING_TYPE_H
 

	
 
#include "core/enum_type.hpp"
 
#include <vector>
 
#include <string>
 

	
 
/** A non-breaking space. */
 
#define NBSP u8"\u00a0"
src/tar_type.h
Show inline comments
 
@@ -11,7 +11,6 @@
 
#define TAR_TYPE_H
 

	
 
#include <map>
 
#include <string>
 
#include <array>
 

	
 
#include "fileio_type.h"
src/textfile_gui.h
Show inline comments
 
@@ -14,7 +14,6 @@
 
#include "strings_func.h"
 
#include "textfile_type.h"
 
#include "window_gui.h"
 
#include <optional>
 

	
 
std::optional<std::string> GetTextfile(TextfileType type, Subdirectory dir, const std::string &filename);
 

	
src/timer/timer.h
Show inline comments
 
@@ -12,7 +12,6 @@
 

	
 
#include "timer_manager.h"
 

	
 
#include <functional>
 

	
 
/**
 
 * The base where every other type of timer is derived from.
src/timetable_gui.cpp
Show inline comments
 
@@ -24,7 +24,6 @@
 
#include "settings_type.h"
 
#include "timetable_cmd.h"
 
#include "timetable.h"
 
#include <cstdint>
 

	
 
#include "widgets/timetable_widget.h"
 

	
src/townname_type.h
Show inline comments
 
@@ -17,7 +17,6 @@
 
#include "town_type.h"
 
#include "string_type.h"
 
#include <set>
 
#include <string>
 

	
 
typedef std::set<std::string> TownNames;
 

	
src/vehicle_gui_base.h
Show inline comments
 
@@ -20,7 +20,6 @@
 
#include "window_gui.h"
 
#include "widgets/dropdown_type.h"
 

	
 
#include <iterator>
 
#include <numeric>
 

	
 
typedef GUIList<const Vehicle*, CargoID> GUIVehicleList;
src/video/video_driver.hpp
Show inline comments
 
@@ -21,8 +21,6 @@
 
#include <condition_variable>
 
#include <mutex>
 
#include <thread>
 
#include <vector>
 
#include <functional>
 

	
 
extern std::string _ini_videodriver;
 
extern std::vector<Dimension> _resolutions;
src/window_gui.h
Show inline comments
 
@@ -11,8 +11,6 @@
 
#define WINDOW_GUI_H
 

	
 
#include <list>
 
#include <algorithm>
 
#include <functional>
 

	
 
#include "vehiclelist.h"
 
#include "vehicle_type.h"
0 comments (0 inline, 0 general)