RetroTypes: Make SObjectTag's operator bool explicit

Prevents potentially error-prone implicit conversions to bool.
This commit is contained in:
Lioncash 2019-09-30 09:00:15 -04:00
parent 8176bf75ef
commit c77153b03c
1 changed files with 1 additions and 1 deletions

View File

@ -49,7 +49,7 @@ struct SObjectTag {
FourCC type;
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 !operator==(other); }
constexpr bool operator<(const SObjectTag& other) const noexcept { return id < other.id; }