summaryrefslogtreecommitdiffstats
path: root/src/input_common/udp/protocol.cpp
diff options
context:
space:
mode:
authorFearlessTobi <thm.frey@gmail.com>2019-11-03 07:04:28 +0100
committerFearlessTobi <thm.frey@gmail.com>2020-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
yuzu-0fe11746fcb37de2465cdbbe74be6ad4a59228e5.tar.gz
yuzu-0fe11746fcb37de2465cdbbe74be6ad4a59228e5.tar.bz2
yuzu-0fe11746fcb37de2465cdbbe74be6ad4a59228e5.tar.lz
yuzu-0fe11746fcb37de2465cdbbe74be6ad4a59228e5.tar.xz
yuzu-0fe11746fcb37de2465cdbbe74be6ad4a59228e5.tar.zst
yuzu-0fe11746fcb37de2465cdbbe74be6ad4a59228e5.zip
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 @@
namespace InputCommon::CemuhookUDP {
-static const std::size_t GetSizeOfResponseType(Type t) {
+static constexpr std::size_t GetSizeOfResponseType(Type t) {
switch (t) {
case Type::Version:
return sizeof(Response::Version);
@@ -34,7 +34,7 @@ std::optional<Type> Validate(u8* data, std::size_t size) {
LOG_DEBUG(Input, "Invalid UDP packet received");
return {};
}
- Header header;
+ Header header{};
std::memcpy(&header, data, sizeof(Header));
if (header.magic != SERVER_MAGIC) {
LOG_ERROR(Input, "UDP Packet has an unexpected magic value");