RetroTypes: Eliminate casts where applicable

Same behavior, minus any type casting.
This commit is contained in:
Lioncash 2020-05-08 19:39:19 -04:00
parent 5d209c8dc8
commit ef15fd5b18
1 changed files with 2 additions and 2 deletions

View File

@ -66,7 +66,7 @@ struct SObjectTag {
}; };
struct TEditorId { struct TEditorId {
u32 id = u32(-1); u32 id = UINT32_MAX;
constexpr TEditorId() noexcept = default; constexpr TEditorId() noexcept = default;
constexpr TEditorId(u32 idin) noexcept : id(idin) {} constexpr TEditorId(u32 idin) noexcept : id(idin) {}
@ -83,7 +83,7 @@ struct TEditorId {
#define kInvalidEditorId TEditorId() #define kInvalidEditorId TEditorId()
struct TUniqueId { struct TUniqueId {
u16 id = u16(-1); u16 id = UINT16_MAX;
constexpr TUniqueId() noexcept = default; constexpr TUniqueId() noexcept = default;
constexpr TUniqueId(u16 value, u16 version) noexcept : id(value | (version << 10)) {} constexpr TUniqueId(u16 value, u16 version) noexcept : id(value | (version << 10)) {}