summaryrefslogtreecommitdiff
path: root/src/input_common/udp/protocol.cpp
diff options
context:
space:
mode:
authorGravatar FearlessTobi2019-11-03 07:04:28 +0100
committerGravatar FearlessTobi2020-01-23 20:55:26 +0100
commit0fe11746fcb37de2465cdbbe74be6ad4a59228e5 (patch)
treedf1f0c06411a69f801e969db6892ade90dec6460 /src/input_common/udp/protocol.cpp
parentInput: UDP Client to provide motion and touch controls (diff)
downloadyuzu-0fe11746fcb37de2465cdbbe74be6ad4a59228e5.tar.gz
yuzu-0fe11746fcb37de2465cdbbe74be6ad4a59228e5.tar.xz
yuzu-0fe11746fcb37de2465cdbbe74be6ad4a59228e5.zip
Address review comments
Diffstat (limited to 'src/input_common/udp/protocol.cpp')
-rw-r--r--src/input_common/udp/protocol.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/input_common/udp/protocol.cpp b/src/input_common/udp/protocol.cpp
index d65069207..16da706d5 100644
--- a/src/input_common/udp/protocol.cpp
+++ b/src/input_common/udp/protocol.cpp
@@ -9,7 +9,7 @@
9 9
10namespace InputCommon::CemuhookUDP { 10namespace InputCommon::CemuhookUDP {
11 11
12static const std::size_t GetSizeOfResponseType(Type t) { 12static constexpr std::size_t GetSizeOfResponseType(Type t) {
13 switch (t) { 13 switch (t) {
14 case Type::Version: 14 case Type::Version:
15 return sizeof(Response::Version); 15 return sizeof(Response::Version);
@@ -34,7 +34,7 @@ std::optional<Type> Validate(u8* data, std::size_t size) {
34 LOG_DEBUG(Input, "Invalid UDP packet received"); 34 LOG_DEBUG(Input, "Invalid UDP packet received");
35 return {}; 35 return {};
36 } 36 }
37 Header header; 37 Header header{};
38 std::memcpy(&header, data, sizeof(Header)); 38 std::memcpy(&header, data, sizeof(Header));
39 if (header.magic != SERVER_MAGIC) { 39 if (header.magic != SERVER_MAGIC) {
40 LOG_ERROR(Input, "UDP Packet has an unexpected magic value"); 40 LOG_ERROR(Input, "UDP Packet has an unexpected magic value");