diff options
author | FearlessTobi <thm.frey@gmail.com> | 2022-09-12 22:39:18 +0200 |
---|---|---|
committer | FearlessTobi <thm.frey@gmail.com> | 2022-09-20 19:36:32 +0200 |
commit | 4213f1c126afda9c5235c868ded4e7d95438bffc (patch) | |
tree | afc604f144281afbd45ce8a757f1d1fbb020018b /src/core/hle/service/ldn/ldn_types.h | |
parent | dedicated_room: fix token padding ... (diff) | |
download | yuzu-4213f1c126afda9c5235c868ded4e7d95438bffc.tar yuzu-4213f1c126afda9c5235c868ded4e7d95438bffc.tar.gz yuzu-4213f1c126afda9c5235c868ded4e7d95438bffc.tar.bz2 yuzu-4213f1c126afda9c5235c868ded4e7d95438bffc.tar.lz yuzu-4213f1c126afda9c5235c868ded4e7d95438bffc.tar.xz yuzu-4213f1c126afda9c5235c868ded4e7d95438bffc.tar.zst yuzu-4213f1c126afda9c5235c868ded4e7d95438bffc.zip |
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"); |