From cda24b8eb14cfee0105f889aa342be322f3cfc30 Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 9 Feb 2021 17:36:29 -0500 Subject: [PATCH 1/2] udp/client: Define ClientData constructor/destructor in cpp file Prevents compilation errors on clang 12 due to incomplete types within a unique_ptr member. --- src/input_common/udp/client.cpp | 4 ++++ src/input_common/udp/client.h | 3 +++ 2 files changed, 7 insertions(+) diff --git a/src/input_common/udp/client.cpp b/src/input_common/udp/client.cpp index e7e50d789b..c4afa41747 100644 --- a/src/input_common/udp/client.cpp +++ b/src/input_common/udp/client.cpp @@ -144,6 +144,10 @@ Client::~Client() { Reset(); } +Client::ClientData::ClientData() = default; + +Client::ClientData::~ClientData() = default; + std::vector Client::GetInputDevices() const { std::vector devices; for (std::size_t client = 0; client < clients.size(); client++) { diff --git a/src/input_common/udp/client.h b/src/input_common/udp/client.h index 822f9c5503..a523f61245 100644 --- a/src/input_common/udp/client.h +++ b/src/input_common/udp/client.h @@ -98,6 +98,9 @@ public: private: struct ClientData { + ClientData(); + ~ClientData(); + std::string host{"127.0.0.1"}; u16 port{26760}; std::size_t pad_index{}; From a352f34462887a3983fa0f2d27129d2bd0a8df6c Mon Sep 17 00:00:00 2001 From: Lioncash Date: Tue, 9 Feb 2021 17:38:42 -0500 Subject: [PATCH 2/2] udp: Silence unused member variable warnings Simply mark them as unused for now. --- src/input_common/udp/udp.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/input_common/udp/udp.cpp b/src/input_common/udp/udp.cpp index b630281a0e..9829da6f00 100644 --- a/src/input_common/udp/udp.cpp +++ b/src/input_common/udp/udp.cpp @@ -84,8 +84,8 @@ public: private: const std::string ip; - const u16 port; - const u16 pad; + [[maybe_unused]] const u16 port; + [[maybe_unused]] const u16 pad; CemuhookUDP::Client* client; mutable std::mutex mutex; };