mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-05-13 23:11:20 +00:00
RetroTypes: Make SObjectTag's operator bool explicit
Prevents potentially error-prone implicit conversions to bool.
This commit is contained in:
parent
8176bf75ef
commit
c77153b03c
@ -49,7 +49,7 @@ struct SObjectTag {
|
|||||||
FourCC type;
|
FourCC type;
|
||||||
CAssetId id;
|
CAssetId id;
|
||||||
|
|
||||||
constexpr operator bool() const noexcept { return id.IsValid(); }
|
constexpr explicit operator bool() const noexcept { return id.IsValid(); }
|
||||||
constexpr bool operator==(const SObjectTag& other) const noexcept { return id == other.id; }
|
constexpr bool operator==(const SObjectTag& other) const noexcept { return id == other.id; }
|
||||||
constexpr bool operator!=(const SObjectTag& other) const noexcept { return !operator==(other); }
|
constexpr bool operator!=(const SObjectTag& other) const noexcept { return !operator==(other); }
|
||||||
constexpr bool operator<(const SObjectTag& other) const noexcept { return id < other.id; }
|
constexpr bool operator<(const SObjectTag& other) const noexcept { return id < other.id; }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user