diff options
| author | 2022-08-27 04:49:10 +0200 | |
|---|---|---|
| committer | 2022-08-27 04:49:10 +0200 | |
| commit | 6791301d9a2fa8ddfe0de0d059763c701b830f94 (patch) | |
| tree | 7885c5c238609834c58fd6ff36126c2bd9eb96f1 | |
| parent | yuzu/chat_room: Make font size bigger (diff) | |
| download | yuzu-6791301d9a2fa8ddfe0de0d059763c701b830f94.tar.gz yuzu-6791301d9a2fa8ddfe0de0d059763c701b830f94.tar.xz yuzu-6791301d9a2fa8ddfe0de0d059763c701b830f94.zip | |
core/ldn_types: Minor corrections and additions
| -rw-r--r-- | src/core/hle/service/ldn/ldn_types.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/core/hle/service/ldn/ldn_types.h b/src/core/hle/service/ldn/ldn_types.h index 0c07a7397..0af653164 100644 --- a/src/core/hle/service/ldn/ldn_types.h +++ b/src/core/hle/service/ldn/ldn_types.h | |||
| @@ -113,7 +113,7 @@ enum class LinkLevel : s8 { | |||
| 113 | Bad, | 113 | Bad, |
| 114 | Low, | 114 | Low, |
| 115 | Good, | 115 | Good, |
| 116 | Excelent, | 116 | Excellent, |
| 117 | }; | 117 | }; |
| 118 | 118 | ||
| 119 | struct NodeLatestUpdate { | 119 | struct NodeLatestUpdate { |
| @@ -148,9 +148,24 @@ struct Ssid { | |||
| 148 | u8 length; | 148 | u8 length; |
| 149 | std::array<char, SsidLengthMax + 1> raw; | 149 | std::array<char, SsidLengthMax + 1> raw; |
| 150 | 150 | ||
| 151 | Ssid() { | ||
| 152 | length = 0; | ||
| 153 | std::memset(raw.data(), 0, raw.size()); | ||
| 154 | } | ||
| 155 | |||
| 156 | Ssid(std::string data) { | ||
| 157 | length = static_cast<u8>(std::min(data.size(), SsidLengthMax)); | ||
| 158 | std::memcpy(raw.data(), data.data(), length); | ||
| 159 | raw[length] = 0; | ||
| 160 | } | ||
| 161 | |||
| 151 | std::string GetStringValue() const { | 162 | std::string GetStringValue() const { |
| 152 | return std::string(raw.data(), length); | 163 | return std::string(raw.data(), length); |
| 153 | } | 164 | } |
| 165 | |||
| 166 | bool operator==(const Ssid& b) const { | ||
| 167 | return (length == b.length) && (std::memcmp(raw.data(), b.raw.data(), length) == 0); | ||
| 168 | } | ||
| 154 | }; | 169 | }; |
| 155 | static_assert(sizeof(Ssid) == 0x22, "Ssid is an invalid size"); | 170 | static_assert(sizeof(Ssid) == 0x22, "Ssid is an invalid size"); |
| 156 | 171 | ||