Definition of base types and functions in a cross-platform compatible way.
More...
#include <stdint.h>
#include <algorithm>
#include <array>
#include <bit>
#include <cassert>
#include <cctype>
#include <cerrno>
#include <climits>
#include <cmath>
#include <cstddef>
#include <cstdint>
#include <cstdio>
#include <cstring>
#include <cstdlib>
#include <cwchar>
#include <deque>
#include <exception>
#include <functional>
#include <iterator>
#include <list>
#include <limits>
#include <map>
#include <memory>
#include <numeric>
#include <optional>
#include <set>
#include <source_location>
#include <span>
#include <stdexcept>
#include <string>
#include <type_traits>
#include <variant>
#include <vector>
Go to the source code of this file.
|
typedef unsigned int | uint |
|
|
template<typename T > |
std::string | FS2OTTD (T name) |
|
template<typename T > |
std::string | OTTD2FS (T name) |
|
template<typename T , size_t N> |
char(& | ArraySizeHelper (T(&array)[N]))[N] |
|
void | NOT_REACHED (const std::source_location location=std::source_location::current()) |
|
void | AssertFailedError (const char *expression, const std::source_location location=std::source_location::current()) |
|
void | free (const void *ptr) |
| Version of the standard free that accepts const pointers.
|
|
Definition of base types and functions in a cross-platform compatible way.
Definition in file stdafx.h.
◆ __STDC_LIMIT_MACROS
#define __STDC_LIMIT_MACROS |
◆ cpp_sizeof
#define cpp_sizeof |
( |
|
base, |
|
|
|
variable |
|
) |
| (sizeof(std::declval<base>().variable)) |
Gets the size of a variable within a class.
- Parameters
-
base | The class the variable is in. |
variable | The variable to get the size of. |
- Returns
- the size of the variable
Definition at line 288 of file stdafx.h.
◆ debug_inline
#define debug_inline inline |
◆ EMPTY_BASES
◆ FMT_HEADER_ONLY
◆ GNU_TARGET
◆ IGNORE_UNINITIALIZED_WARNING_START
#define IGNORE_UNINITIALIZED_WARNING_START |
◆ IGNORE_UNINITIALIZED_WARNING_STOP
#define IGNORE_UNINITIALIZED_WARNING_STOP |
◆ JSON_ASSERT
#define JSON_ASSERT |
( |
|
x | ) |
assert(x) |
◆ lengthof
#define lengthof |
( |
|
array | ) |
(sizeof(ArraySizeHelper(array))) |
Return the length of an fixed size array.
Unlike sizeof this function returns the number of elements of the given type.
- Parameters
-
x | The pointer to the first element of the array |
- Returns
- The number of elements
Definition at line 280 of file stdafx.h.
◆ M_PI
#define M_PI 3.14159265358979323846 |
◆ M_PI_2
#define M_PI_2 1.57079632679489661923 |
◆ MAX_PATH
◆ MAX_UVALUE
#define MAX_UVALUE |
( |
|
type | ) |
(static_cast<type>(~static_cast<type>(0))) |
The largest value that can be entered in a variable.
- Parameters
-
type | the type of the variable |
Definition at line 343 of file stdafx.h.
◆ NOACCESS
◆ PACK
#define PACK |
( |
|
type_dec | ) |
PACK_N(type_dec, 1) |
◆ PACK_N
#define PACK_N |
( |
|
type_dec, |
|
|
|
n |
|
) |
| type_dec __attribute__((__packed__, aligned(n))) |
◆ PATHSEP
◆ PATHSEPCHAR
◆ PERSONAL_DIR
◆ uint
typedef unsigned int uint |
◆ AssertFailedError()
void AssertFailedError |
( |
const char * |
expression, |
|
|
const std::source_location |
location = std::source_location::current() |
|
) |
| |
◆ free()
void free |
( |
const void * |
ptr | ) |
|
|
inline |
Version of the standard free that accepts const pointers.
- Parameters
-
Definition at line 334 of file stdafx.h.
References free().
Referenced by ReusableBuffer< T >::Allocate(), Map::Allocate(), ScriptAllocator::CheckAllocation(), ClearSnowLine(), DEFINE_POOL_METHOD(), free(), FreeEngine(), Path::GetCapacityRatio(), GetLayouter(), InitializeOldNames(), OpenGLBackend::InternalClearCursorCache(), ZeroedMemoryAllocator::operator delete(), ZeroedMemoryAllocator::operator delete[](), Blitter_32bppAnim::PostResize(), ReallocT(), ResetBridges(), ResetOldNames(), StringFilter::SetFilterTerm(), VideoDriver_Dedicated::Stop(), CrashLogOSX::SurveyStacktrace(), CrashLogUnix::SurveyStacktrace(), ReusableBuffer< T >::ZeroAllocate(), and ReusableBuffer< T >::~ReusableBuffer().
◆ FS2OTTD()
template<typename T >
std::string FS2OTTD |
( |
T |
name | ) |
|
◆ NOT_REACHED()
void NOT_REACHED |
( |
const std::source_location |
location = std::source_location::current() | ) |
|
◆ OTTD2FS()
template<typename T >
std::string OTTD2FS |
( |
T |
name | ) |
|