diff options
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/ldn/ldn_types.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/core/hle/service/ldn/ldn_types.h b/src/core/hle/service/ldn/ldn_types.h index d6609fff5..44c2c773b 100644 --- a/src/core/hle/service/ldn/ldn_types.h +++ b/src/core/hle/service/ldn/ldn_types.h @@ -31,13 +31,7 @@ enum class NodeStateChange : u8 { DisconnectAndConnect, }; -inline NodeStateChange operator|(NodeStateChange a, NodeStateChange b) { - return static_cast<NodeStateChange>(static_cast<u8>(a) | static_cast<u8>(b)); -} - -inline NodeStateChange operator|=(NodeStateChange& a, NodeStateChange b) { - return a = a | b; -} +DECLARE_ENUM_FLAG_OPERATORS(NodeStateChange) enum class ScanFilterFlag : u32 { None = 0, @@ -163,7 +157,7 @@ struct Ssid { Ssid() = default; - explicit Ssid(std::string_view data) { + constexpr explicit Ssid(std::string_view data) { length = static_cast<u8>(std::min(data.size(), SsidLengthMax)); data.copy(raw.data(), length); raw[length] = 0; @@ -176,6 +170,10 @@ struct Ssid { bool operator==(const Ssid& b) const { return (length == b.length) && (std::memcmp(raw.data(), b.raw.data(), length) == 0); } + + bool operator!=(const Ssid& b) const { + return !operator==(b); + } }; static_assert(sizeof(Ssid) == 0x22, "Ssid is an invalid size"); |