mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-10 20:27:43 +00:00
RetroTypes: Make SObjectTag's operator bool explicit
Prevents potentially error-prone implicit conversions to bool.
This commit is contained in:
@@ -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; }
|
||||||
|
|||||||
Reference in New Issue
Block a user