Codechange: add annotation to selectively force inlining in debug build

This commit is contained in:
Rubidium
2023-01-24 22:50:53 +01:00
committed by rubidium42
parent df89c34e03
commit b7a5d8e296
10 changed files with 102 additions and 37 deletions

View File

@@ -85,8 +85,18 @@ enum TropicZone {
struct TileIndex : StrongIntegralTypedef<uint32, TileIndex> {
using StrongIntegralTypedef<uint32, TileIndex>::StrongIntegralTypedef;
debug_inline constexpr TileIndex() = default;
debug_inline constexpr TileIndex(const TileIndex &o) = default;
debug_inline constexpr TileIndex(TileIndex &&o) = default;
debug_inline constexpr TileIndex(const uint32 &value) : StrongIntegralTypedef<uint32, TileIndex>(value) {}
debug_inline constexpr TileIndex &operator =(const TileIndex &rhs) { this->value = rhs.value; return *this; }
debug_inline constexpr TileIndex &operator =(TileIndex &&rhs) { this->value = std::move(rhs.value); return *this; }
debug_inline constexpr TileIndex &operator =(const uint32 &rhs) { this->value = rhs; return *this; }
/** Implicit conversion to the base type for e.g. array indexing. */
constexpr operator uint32() const { return this->value; }
debug_inline constexpr operator uint32() const { return this->value; }
/* Import operators from the base class into our overload set. */
using StrongIntegralTypedef::operator ==;