Changeset - r27283:895ef9174a75
[Not reviewed]
master
! ! !
Rubidium - 18 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
 
@@ -9,13 +9,12 @@
 

	
 
#ifndef BASE_CONSIST_H
 
#define BASE_CONSIST_H
 

	
 
#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 {
 
	std::string name;                   ///< Name of vehicle
 

	
 
	/* Used for timetabling. */
src/bitmap_type.h
Show inline comments
 
@@ -7,13 +7,12 @@
 

	
 
/** @file bitmap_type.hpp Bitmap functions. */
 

	
 
#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.
 
 * A std::vector<bool> is used to mark which tiles are contained.
 
 */
 
class BitmapTileArea : public TileArea {
src/cargotype.h
Show inline comments
 
@@ -14,13 +14,12 @@
 
#include "cargo_type.h"
 
#include "gfx_type.h"
 
#include "strings_type.h"
 
#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;
 

	
 
/** Town growth effect when delivering cargo. */
 
enum TownEffect : byte {
src/command_type.h
Show inline comments
 
@@ -10,13 +10,12 @@
 
#ifndef COMMAND_TYPE_H
 
#define COMMAND_TYPE_H
 

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

	
 
struct GRFFile;
 

	
 
/**
 
 * Common return value for all commands. Wraps the cost and
 
 * a possible error message/state together.
src/company_base.h
Show inline comments
 
@@ -14,13 +14,12 @@
 
#include "livery.h"
 
#include "autoreplace_type.h"
 
#include "tile_type.h"
 
#include "timer/timer_game_calendar.h"
 
#include "settings_type.h"
 
#include "group.h"
 
#include <string>
 
#include <array>
 

	
 
/** Statistics about the economy. */
 
struct CompanyEconomyEntry {
 
	Money income;               ///< The amount of income.
 
	Money expenses;             ///< The amount of expenses.
src/console_gui.cpp
Show inline comments
 
@@ -20,13 +20,12 @@
 
#include "console_func.h"
 
#include "rev.h"
 
#include "video/video_driver.hpp"
 
#include "timer/timer.h"
 
#include "timer/timer_window.h"
 
#include <deque>
 
#include <string>
 

	
 
#include "widgets/console_widget.h"
 

	
 
#include "table/strings.h"
 

	
 
#include "safeguards.h"
src/core/kdtree.hpp
Show inline comments
 
@@ -8,14 +8,12 @@
 
/** @file kdtree.hpp K-d tree template specialised for 2-dimensional Manhattan geometry */
 

	
 
#ifndef KDTREE_HPP
 
#define KDTREE_HPP
 

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

	
 
/**
 
 * K-dimensional tree, specialised for 2-dimensional space.
 
 * This is not intended as a primary storage of data, but as an index into existing data.
 
 * Usually the type stored by this tree should be an index into an existing array.
 
 *
src/core/math_func.hpp
Show inline comments
 
@@ -7,14 +7,12 @@
 

	
 
/** @file math_func.hpp Integer math functions */
 

	
 
#ifndef MATH_FUNC_HPP
 
#define MATH_FUNC_HPP
 

	
 
#include <limits>
 
#include <type_traits>
 

	
 
/**
 
 * Returns the absolute value of (scalar) variable.
 
 *
 
 * @note assumes variable to be signed
 
 * @param a The value we want to unsign
src/core/overflowsafe_type.hpp
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
#ifndef OVERFLOWSAFE_TYPE_HPP
 
#define OVERFLOWSAFE_TYPE_HPP
 

	
 
#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)
 
#		define HAS_OVERFLOW_BUILTINS
 
#	endif
 
#endif
src/core/smallvec_type.hpp
Show inline comments
 
@@ -8,13 +8,12 @@
 
/** @file smallvec_type.hpp Simple vector class that allows allocating an item without the need to copy this->data needlessly. */
 

	
 
#ifndef SMALLVEC_TYPE_HPP
 
#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
 
 * Consider using std::set, std::unordered_set or std::flat_set in new code
 
 *
 
 * @param vec A reference to the vector to be extended
src/dedicated.cpp
Show inline comments
 
@@ -7,13 +7,12 @@
 

	
 
/** @file dedicated.cpp Forking support for dedicated servers. */
 

	
 
#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
 

	
 
#if defined(UNIX)
 

	
src/driver.cpp
Show inline comments
 
@@ -13,13 +13,12 @@
 
#include "error_func.h"
 
#include "sound/sound_driver.hpp"
 
#include "music/music_driver.hpp"
 
#include "video/video_driver.hpp"
 
#include "string_func.h"
 
#include "table/strings.h"
 
#include <string>
 
#include <sstream>
 

	
 
#include "safeguards.h"
 

	
 
std::string _ini_videodriver;        ///< The video driver a stored in the configuration file.
 
std::vector<Dimension> _resolutions; ///< List of resolutions.
src/fileio_func.h
Show inline comments
 
@@ -9,14 +9,12 @@
 

	
 
#ifndef FILEIO_FUNC_H
 
#define FILEIO_FUNC_H
 

	
 
#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);
 
bool FioCheckFileExists(const std::string &filename, Subdirectory subdir);
 
std::string FioFindFullPath(Subdirectory subdir, const std::string &filename);
 
std::string FioGetDirectory(Searchpath sp, Subdirectory subdir);
src/fios.cpp
Show inline comments
 
@@ -17,14 +17,12 @@
 
#include "network/network_content.h"
 
#include "screenshot.h"
 
#include "string_func.h"
 
#include "strings_func.h"
 
#include "tar_type.h"
 
#include <sys/stat.h>
 
#include <functional>
 
#include <optional>
 
#include <charconv>
 

	
 
#ifndef _WIN32
 
# include <unistd.h>
 
#endif /* _WIN32 */
 

	
src/framerate_gui.cpp
Show inline comments
 
@@ -26,13 +26,12 @@
 
#include "timer/timer_window.h"
 

	
 
#include "widgets/framerate_widget.h"
 

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

	
 
#include "safeguards.h"
 

	
 
static std::mutex _sound_perf_lock;
 
static std::atomic<bool> _sound_perf_pending;
 
static std::vector<TimingMeasurement> _sound_perf_measurements;
src/game/game_text.cpp
Show inline comments
 
@@ -19,13 +19,12 @@
 
#include "game_info.hpp"
 

	
 
#include "table/strings.h"
 
#include "table/strgen_tables.h"
 

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

	
 
#include "../safeguards.h"
 

	
 
void CDECL StrgenWarningI(const std::string &msg)
 
{
 
	Debug(script, 0, "{}:{}: warning: {}", _file, _cur_line, msg);
src/gamelog.h
Show inline comments
 
@@ -7,13 +7,12 @@
 

	
 
/** @file gamelog.h Functions to be called to log possibly unsafe game events */
 

	
 
#ifndef GAMELOG_H
 
#define GAMELOG_H
 

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

	
 
/** The actions we log. */
 
enum GamelogActionType : uint8 {
 
	GLAT_START,        ///< Game created
 
	GLAT_LOAD,         ///< Game loaded
src/gfx_layout.h
Show inline comments
 
@@ -12,17 +12,14 @@
 

	
 
#include "fontcache.h"
 
#include "gfx_func.h"
 
#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
 
 * of the same text, e.g. on line breaks.
 
 */
 
struct FontState {
src/group.h
Show inline comments
 
@@ -13,13 +13,12 @@
 
#include "group_type.h"
 
#include "core/pool_type.hpp"
 
#include "company_type.h"
 
#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.
 

	
 
/** Statistics and caches on the vehicles in a group. */
 
struct GroupStatistics {
src/industrytype.h
Show inline comments
 
@@ -8,13 +8,12 @@
 
/** @file industrytype.h %Industry type specs. */
 

	
 
#ifndef INDUSTRYTYPE_H
 
#define INDUSTRYTYPE_H
 

	
 
#include <array>
 
#include <vector>
 
#include "map_type.h"
 
#include "slope_type.h"
 
#include "industry_type.h"
 
#include "landscape_type.h"
 
#include "cargo_type.h"
 
#include "newgrf_animation_type.h"
src/ini_type.h
Show inline comments
 
@@ -8,14 +8,12 @@
 
/** @file ini_type.h Types related to reading/writing '*.ini' files. */
 

	
 
#ifndef INI_TYPE_H
 
#define INI_TYPE_H
 

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

	
 
/** Types of groups */
 
enum IniGroupType {
 
	IGT_VARIABLES = 0, ///< Values of the form "landscape = hilly".
 
	IGT_LIST      = 1, ///< A list of values, separated by \n and terminated by the next group block.
 
	IGT_SEQUENCE  = 2, ///< A list of uninterpreted lines, terminated by the next group block.
src/linkgraph/linkgraph_gui.h
Show inline comments
 
@@ -13,13 +13,12 @@
 
#include "../company_func.h"
 
#include "../station_base.h"
 
#include "../widget_type.h"
 
#include "../window_gui.h"
 
#include "linkgraph_base.h"
 
#include <map>
 
#include <vector>
 

	
 
/**
 
 * Monthly statistics for a link between two stations.
 
 * Only the cargo type of the most saturated linkgraph is taken into account.
 
 */
 
struct LinkProperties {
src/linkgraph/mcf.h
Show inline comments
 
/** @file mcf.h Declaration of Multi-Commodity-Flow solver */
 

	
 
#ifndef MCF_H
 
#define MCF_H
 

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

	
 
typedef std::vector<Path *> PathVector;
 

	
 
/**
 
 * Multi-commodity flow calculating base class.
 
 */
src/linkgraph/refresh.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
#ifndef REFRESH_H
 
#define REFRESH_H
 

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

	
 
/**
 
 * Utility to refresh links a consist will visit.
 
 */
src/misc/dbg_helpers.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
#ifndef DBG_HELPERS_H
 
#define DBG_HELPERS_H
 

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

	
 
#include "../direction_type.h"
 
#include "../signal_type.h"
 
#include "../tile_type.h"
 
#include "../track_type.h"
 

	
src/misc/endian_buffer.hpp
Show inline comments
 
@@ -7,13 +7,12 @@
 

	
 
/** @file endian_buffer.hpp Endian-aware buffer. */
 

	
 
#ifndef ENDIAN_BUFFER_HPP
 
#define ENDIAN_BUFFER_HPP
 

	
 
#include <iterator>
 
#include <string_view>
 
#include "../core/span_type.hpp"
 
#include "../core/bitmath_func.hpp"
 
#include "../core/overflowsafe_type.hpp"
 

	
 
struct StrongTypedefBase;
src/misc/lrucache.hpp
Show inline comments
 
@@ -9,15 +9,13 @@
 

	
 
#ifndef LRUCACHE_HPP
 
#define LRUCACHE_HPP
 

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

	
 
/**
 
 * Size limited cache with a least recently used eviction strategy.
 
 * @tparam Tkey Type of the cache key.
 
 * @tparam Tdata Type of the cache item. The cache will store a pointer of this type.
 
 */
src/music/midifile.hpp
Show inline comments
 
@@ -10,14 +10,12 @@
 
#ifndef MUSIC_MIDIFILE_HPP
 
#define MUSIC_MIDIFILE_HPP
 

	
 
#include "../stdafx.h"
 
#include "../core/smallvec_type.hpp"
 
#include "midi.h"
 
#include <vector>
 
#include <string>
 

	
 
struct MusicSongInfo;
 

	
 
struct MidiFile {
 
	struct DataBlock {
 
		uint32 ticktime;        ///< tick number since start of file this block should be triggered at
src/music_gui.cpp
Show inline comments
 
@@ -5,13 +5,12 @@
 
 * See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with OpenTTD. If not, see <http://www.gnu.org/licenses/>.
 
 */
 

	
 
/** @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"
 
#include "window_gui.h"
 
#include "strings_func.h"
 
#include "window_func.h"
src/network/core/address.h
Show inline comments
 
@@ -13,13 +13,12 @@
 
#include "os_abstraction.h"
 
#include "config.h"
 
#include "../../company_type.h"
 
#include "../../string_func.h"
 
#include "../../core/smallmap_type.hpp"
 

	
 
#include <string>
 

	
 
class NetworkAddress;
 
typedef std::vector<NetworkAddress> NetworkAddressList; ///< Type for a list of addresses.
 
typedef SmallMap<NetworkAddress, SOCKET> SocketList;    ///< Type for a mapping between address and socket.
 

	
 
/**
src/network/core/config.cpp
Show inline comments
 
@@ -8,13 +8,12 @@
 
/**
 
 * @file config.cpp Configuration of the connection strings for network stuff using environment variables.
 
 */
 

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

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

	
 
#include "../../safeguards.h"
 

	
 
/**
 
 * Get the environment variable using std::getenv and when it is an empty string (or nullptr), return a fallback value instead.
src/network/core/http_curl.cpp
Show inline comments
 
@@ -18,13 +18,12 @@
 

	
 
#include "http.h"
 

	
 
#include <atomic>
 
#include <condition_variable>
 
#include <curl/curl.h>
 
#include <memory>
 
#include <mutex>
 
#include <queue>
 

	
 
#include "../../safeguards.h"
 

	
 
#if defined(UNIX)
src/network/core/packet.h
Show inline comments
 
@@ -13,14 +13,12 @@
 
#define NETWORK_CORE_PACKET_H
 

	
 
#include "os_abstraction.h"
 
#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
 

	
 
/**
 
 * Internal entity of a packet. As everything is sent as a packet,
src/network/core/tcp_content_type.h
Show inline comments
 
@@ -9,14 +9,12 @@
 
 * @file tcp_content_type.h Basic types related to the content on the content server.
 
 */
 

	
 
#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
 
	CONTENT_TYPE_BASE_GRAPHICS = 1, ///< The content consists of base graphics
 
	CONTENT_TYPE_NEWGRF        = 2, ///< The content consists of a NewGRF
 
	CONTENT_TYPE_AI            = 3, ///< The content consists of an AI
src/newgrf_class.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
#ifndef NEWGRF_CLASS_H
 
#define NEWGRF_CLASS_H
 

	
 
#include "strings_type.h"
 

	
 
#include <vector>
 

	
 
/**
 
 * Struct containing information relating to NewGRF classes for stations and airports.
 
 */
 
template <typename Tspec, typename Tid, Tid Tmax>
 
struct NewGRFClass {
src/newgrf_config.h
Show inline comments
 
@@ -14,13 +14,12 @@
 
#include "core/alloc_type.hpp"
 
#include "core/smallmap_type.hpp"
 
#include "misc/countedptr.hpp"
 
#include "fileio_type.h"
 
#include "textfile_type.h"
 
#include "newgrf_text.h"
 
#include <optional>
 

	
 
/** GRF config bit flags */
 
enum GCF_Flags {
 
	GCF_SYSTEM,     ///< GRF file is an openttd-internal system grf
 
	GCF_UNSAFE,     ///< GRF file is unsafe for static usage
 
	GCF_STATIC,     ///< GRF file is used statically (can be used in any MP game)
src/newgrf_profiling.h
Show inline comments
 
@@ -14,15 +14,12 @@
 
#include "date_type.h"
 
#include "timer/timer_game_calendar.h"
 
#include "newgrf.h"
 
#include "newgrf_callbacks.h"
 
#include "newgrf_spritegroup.h"
 

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

	
 
/**
 
 * Callback profiler for NewGRF development
 
 */
 
struct NewGRFProfiler {
 
	NewGRFProfiler(const GRFFile *grffile);
src/newgrf_text.h
Show inline comments
 
@@ -12,14 +12,12 @@
 

	
 
#include "string_type.h"
 
#include "strings_type.h"
 
#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;
 

	
 
/** A GRF text with associated language ID. */
 
struct GRFText {
src/newgrf_townname.h
Show inline comments
 
@@ -10,13 +10,12 @@
 
 * Header of Action 0F "universal holder" structure and functions
 
 */
 

	
 
#ifndef NEWGRF_TOWNNAME_H
 
#define NEWGRF_TOWNNAME_H
 

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

	
 
struct NamePart {
 
	std::string text; ///< If probability bit 7 is clear
 
	byte id;          ///< If probability bit 7 is set
 
	byte prob;        ///< The relative probability of the following name to appear in the bottom 7 bits.
src/os/macosx/font_osx.cpp
Show inline comments
 
@@ -15,13 +15,12 @@
 
#include "../../fileio_func.h"
 
#include "../../fontdetection.h"
 
#include "../../string_func.h"
 
#include "../../strings_func.h"
 
#include "../../zoom_func.h"
 
#include "macos.h"
 
#include <cmath>
 

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

	
 
#include "safeguards.h"
 

	
 

	
src/os/macosx/string_osx.cpp
Show inline comments
 
@@ -12,13 +12,12 @@
 
#include "../../string_func.h"
 
#include "../../strings_func.h"
 
#include "../../table/control_codes.h"
 
#include "../../fontcache.h"
 
#include "../../zoom_func.h"
 
#include "macos.h"
 
#include <cmath>
 

	
 
#include <CoreFoundation/CoreFoundation.h>
 

	
 

	
 
/* CTRunDelegateCreate is supported since MacOS X 10.5, but was only included in the SDKs starting with the 10.9 SDK. */
 
#ifndef HAVE_OSX_109_SDK
src/os/macosx/string_osx.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
#ifndef STRING_OSX_H
 
#define STRING_OSX_H
 

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

	
 
/** String iterator using CoreText as a backend. */
 
class OSXStringIterator : public StringIterator {
 
	/** Break info for a character. */
 
	struct CharInfo {
 
		bool word_stop : 1; ///< Code point is suitable as a word break.
src/os/windows/string_uniscribe.cpp
Show inline comments
 
@@ -13,13 +13,12 @@
 
#include "../../language.h"
 
#include "../../strings_func.h"
 
#include "../../string_func.h"
 
#include "../../table/control_codes.h"
 
#include "../../zoom_func.h"
 
#include "win32.h"
 
#include <vector>
 

	
 
#include <windows.h>
 
#include <usp10.h>
 

	
 
#include "../../safeguards.h"
 

	
src/os/windows/string_uniscribe.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
#ifndef STRING_UNISCRIBE_H
 
#define STRING_UNISCRIBE_H
 

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

	
 

	
 
void UniscribeResetScriptCache(FontSize size);
 

	
 

	
 
/**
src/pathfinder/yapf/yapf_costrail.hpp
Show inline comments
 
@@ -7,13 +7,12 @@
 

	
 
/** @file yapf_costrail.hpp Cost determination for rails. */
 

	
 
#ifndef YAPF_COSTRAIL_HPP
 
#define YAPF_COSTRAIL_HPP
 

	
 
#include <vector>
 

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

	
 
template <class Types>
 
class CYapfCostRailT : public CYapfCostBase {
 
public:
src/random_access_file_type.h
Show inline comments
 
@@ -8,13 +8,12 @@
 
 /** @file random_access_file_type.h Class related to random access to files. */
 

	
 
#ifndef RANDOM_ACCESS_FILE_TYPE_H
 
#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.
 
 *
 
 * This is mostly intended to be used for things that can be read from GRFs when needed, so
 
 * the graphics but also the sounds. This also ties into the spritecache as it uses these
src/road.h
Show inline comments
 
@@ -16,13 +16,12 @@
 
#include "strings_type.h"
 
#include "timer/timer_game_calendar.h"
 
#include "core/enum_type.hpp"
 
#include "newgrf.h"
 
#include "economy_func.h"
 

	
 
#include <vector>
 

	
 
enum RoadTramType : bool {
 
	RTT_ROAD,
 
	RTT_TRAM,
 
};
 

	
src/saveload/engine_sl.cpp
Show inline comments
 
@@ -12,13 +12,12 @@
 
#include "saveload.h"
 
#include "compat/engine_sl_compat.h"
 

	
 
#include "saveload_internal.h"
 
#include "../engine_base.h"
 
#include "../string_func.h"
 
#include <vector>
 

	
 
#include "../safeguards.h"
 

	
 
static const SaveLoad _engine_desc[] = {
 
	 SLE_CONDVAR(Engine, intro_date,          SLE_FILE_U16 | SLE_VAR_I32,  SL_MIN_VERSION,  SLV_31),
 
	 SLE_CONDVAR(Engine, intro_date,          SLE_INT32,                  SLV_31, SL_MAX_VERSION),
src/saveload/oldloader.cpp
Show inline comments
 
@@ -16,13 +16,12 @@
 

	
 
#include "table/strings.h"
 

	
 
#include "saveload_internal.h"
 
#include "oldloader.h"
 

	
 
#include <exception>
 

	
 
#include "../safeguards.h"
 

	
 
static const int TTO_HEADER_SIZE = 41;
 
static const int TTD_HEADER_SIZE = 49;
 

	
src/saveload/saveload.cpp
Show inline comments
 
@@ -41,14 +41,12 @@
 
#include "../gamelog.h"
 
#include "../string_func.h"
 
#include "../fios.h"
 
#include "../error.h"
 
#include <atomic>
 
#include <deque>
 
#include <vector>
 
#include <string>
 
#ifdef __EMSCRIPTEN__
 
#	include <emscripten.h>
 
#endif
 

	
 
#include "table/strings.h"
 

	
src/saveload/saveload.h
Show inline comments
 
@@ -11,15 +11,12 @@
 
#define SAVELOAD_H
 

	
 
#include "saveload_error.hpp"
 
#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
 
 * introduced and the released version that had that particular
 
 * savegame version.
 
 * Up to savegame version 18 there is a minor version as well.
src/script/api/script_admin.hpp
Show inline comments
 
@@ -7,13 +7,12 @@
 

	
 
/** @file script_admin.hpp Everything to communicate with the AdminPort. */
 

	
 
#ifndef SCRIPT_ADMIN_HPP
 
#define SCRIPT_ADMIN_HPP
 

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

	
 
/**
 
 * Class that handles communication with the AdminPort.
 
 * @api game
 
 */
src/script/api/script_priorityqueue.hpp
Show inline comments
 
@@ -10,13 +10,12 @@
 

	
 
#ifndef SCRIPT_PRIORITYQUEUE_HPP
 
#define SCRIPT_PRIORITYQUEUE_HPP
 

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

	
 
/**
 
 * Class that creates a queue which keeps its items ordered by an item priority.
 
 * @api ai game
 
 */
 
class ScriptPriorityQueue : public ScriptObject {
src/script/script_storage.hpp
Show inline comments
 
@@ -17,13 +17,12 @@
 
#include "../goal_type.h"
 
#include "../story_type.h"
 

	
 
#include "script_log_types.hpp"
 

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

	
 
/**
 
 * The callback function for Mode-classes.
 
 */
 
typedef bool (ScriptModeProc)();
 

	
src/script/squirrel_helper_type.hpp
Show inline comments
 
@@ -7,13 +7,12 @@
 

	
 
/** @file squirrel_helper_type.hpp Helper structs for converting Squirrel data structures to C++. */
 

	
 
#ifndef SQUIRREL_HELPER_TYPE_HPP
 
#define SQUIRREL_HELPER_TYPE_HPP
 

	
 
#include <vector>
 

	
 
/** Definition of a simple array. */
 
template <typename Titem = int32>
 
using Array = std::vector<Titem>;
 

	
 
#endif /* SQUIRREL_HELPER_TYPE_HPP */
src/settings_gui.cpp
Show inline comments
 
@@ -39,14 +39,12 @@
 
#include "rev.h"
 
#include "video/video_driver.hpp"
 
#include "music/music_driver.hpp"
 
#include "gui.h"
 
#include "mixer.h"
 

	
 
#include <vector>
 
#include <iterator>
 

	
 
#include "safeguards.h"
 
#include "video/video_driver.hpp"
 

	
 

	
 
static const StringID _autosave_dropdown[] = {
src/signs_base.h
Show inline comments
 
@@ -11,13 +11,12 @@
 
#define SIGNS_BASE_H
 

	
 
#include "signs_type.h"
 
#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;
 

	
 
struct Sign : SignPool::PoolItem<&_sign_pool> {
 
	std::string         name;
src/station_gui.cpp
Show inline comments
 
@@ -35,13 +35,12 @@
 

	
 
#include "widgets/station_widget.h"
 

	
 
#include "table/strings.h"
 

	
 
#include <set>
 
#include <vector>
 

	
 
#include "safeguards.h"
 

	
 
/**
 
 * Calculates and draws the accepted or supplied cargo around the selected tile(s)
 
 * @param left x position where the string is to be drawn
src/station_gui.h
Show inline comments
 
@@ -11,13 +11,12 @@
 
#define STATION_GUI_H
 

	
 
#include "command_type.h"
 
#include "tilearea_type.h"
 
#include "window_type.h"
 
#include "station_type.h"
 
#include <functional>
 

	
 

	
 
/** Types of cargo to display for station coverage. */
 
enum StationCoverageType {
 
	SCT_PASSENGERS_ONLY,     ///< Draw only passenger class cargoes.
 
	SCT_NON_PASSENGERS_ONLY, ///< Draw all non-passenger class cargoes.
src/stdafx.h
Show inline comments
 
@@ -50,21 +50,34 @@
 
#		define __STDC_LIMIT_MACROS
 
#		include <stdint.h>
 
#	endif
 
#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>
 
#endif
 

	
 
/* Stuff for GCC */
src/strgen/strgen.cpp
Show inline comments
 
@@ -14,13 +14,12 @@
 
#include "../strings_type.h"
 
#include "../misc/getoptdata.h"
 
#include "../table/control_codes.h"
 

	
 
#include "strgen.h"
 

	
 
#include <exception>
 

	
 
#if !defined(_WIN32) || defined(__CYGWIN__)
 
#include <unistd.h>
 
#include <sys/stat.h>
 
#endif
 

	
src/string_type.h
Show inline comments
 
@@ -8,14 +8,12 @@
 
/** @file string_type.h Types for strings. */
 

	
 
#ifndef STRING_TYPE_H
 
#define STRING_TYPE_H
 

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

	
 
/** A non-breaking space. */
 
#define NBSP u8"\u00a0"
 

	
 
/** A left-to-right marker, marks the next character as left-to-right. */
 
#define LRM u8"\u200e"
src/tar_type.h
Show inline comments
 
@@ -8,13 +8,12 @@
 
/** @file tar_type.h Structs, typedefs and macros used for TAR file handling. */
 

	
 
#ifndef TAR_TYPE_H
 
#define TAR_TYPE_H
 

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

	
 
#include "fileio_type.h"
 

	
 

	
 
struct TarFileListEntry {
src/textfile_gui.h
Show inline comments
 
@@ -11,13 +11,12 @@
 
#define TEXTFILE_GUI_H
 

	
 
#include "fileio_type.h"
 
#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);
 

	
 
/** Window for displaying a textfile */
 
struct TextfileWindow : public Window, MissingGlyphSearcher {
 
	struct Line {
src/timer/timer.h
Show inline comments
 
@@ -9,13 +9,12 @@
 

	
 
#ifndef TIMER_H
 
#define TIMER_H
 

	
 
#include "timer_manager.h"
 

	
 
#include <functional>
 

	
 
/**
 
 * The base where every other type of timer is derived from.
 
 *
 
 * Never use this class directly yourself.
 
 */
src/timetable_gui.cpp
Show inline comments
 
@@ -21,13 +21,12 @@
 
#include "timer/timer_game_calendar.h"
 
#include "date_gui.h"
 
#include "vehicle_gui.h"
 
#include "settings_type.h"
 
#include "timetable_cmd.h"
 
#include "timetable.h"
 
#include <cstdint>
 

	
 
#include "widgets/timetable_widget.h"
 

	
 
#include "table/sprites.h"
 
#include "table/strings.h"
 

	
src/townname_type.h
Show inline comments
 
@@ -14,13 +14,12 @@
 
#define TOWNNAME_TYPE_H
 

	
 
#include "newgrf_townname.h"
 
#include "town_type.h"
 
#include "string_type.h"
 
#include <set>
 
#include <string>
 

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

	
 
static constexpr uint BUILTIN_TOWNNAME_GENERATOR_COUNT = SPECSTR_TOWNNAME_LAST - SPECSTR_TOWNNAME_START + 1; ///< Number of built-in town name generators.
 

	
 
/**
src/vehicle_gui_base.h
Show inline comments
 
@@ -17,13 +17,12 @@
 
#include "sortlist_type.h"
 
#include "vehicle_base.h"
 
#include "vehiclelist.h"
 
#include "window_gui.h"
 
#include "widgets/dropdown_type.h"
 

	
 
#include <iterator>
 
#include <numeric>
 

	
 
typedef GUIList<const Vehicle*, CargoID> GUIVehicleList;
 

	
 
struct GUIVehicleGroup {
 
	VehicleList::const_iterator vehicles_begin;    ///< Pointer to beginning element of this vehicle group.
src/video/video_driver.hpp
Show inline comments
 
@@ -18,14 +18,12 @@
 
#include "../zoom_type.h"
 
#include <atomic>
 
#include <chrono>
 
#include <condition_variable>
 
#include <mutex>
 
#include <thread>
 
#include <vector>
 
#include <functional>
 

	
 
extern std::string _ini_videodriver;
 
extern std::vector<Dimension> _resolutions;
 
extern Dimension _cur_resolution;
 
extern bool _rightclick_emulate;
 
extern bool _video_hw_accel;
src/window_gui.h
Show inline comments
 
@@ -8,14 +8,12 @@
 
/** @file window_gui.h Functions, definitions and such used only by the GUI. */
 

	
 
#ifndef WINDOW_GUI_H
 
#define WINDOW_GUI_H
 

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

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