diff options
| author | 2022-01-25 16:15:27 -0500 | |
|---|---|---|
| committer | 2022-01-25 16:15:27 -0500 | |
| commit | 306b3491c4dcab8bcba732c8aa387b20583d8904 (patch) | |
| tree | c2eddc0b01689567c9abfd11f11d997a4f8b482f /src | |
| parent | Merge pull request #7771 from lioncash/assert (diff) | |
| parent | input_common/udp_client: Replace deprecated from_string()/to_ulong() functions (diff) | |
| download | yuzu-306b3491c4dcab8bcba732c8aa387b20583d8904.tar.gz yuzu-306b3491c4dcab8bcba732c8aa387b20583d8904.tar.xz yuzu-306b3491c4dcab8bcba732c8aa387b20583d8904.zip | |
Merge pull request #7773 from lioncash/udp-deprecated
input_common/udp_client: Replace deprecated from_string()/to_ulong() functions
Diffstat (limited to 'src')
| -rw-r--r-- | src/input_common/drivers/udp_client.cpp | 8 | ||||
| -rw-r--r-- | src/input_common/drivers/udp_client.h | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/src/input_common/drivers/udp_client.cpp b/src/input_common/drivers/udp_client.cpp index 9aaeb91be..d1cdb1ab2 100644 --- a/src/input_common/drivers/udp_client.cpp +++ b/src/input_common/drivers/udp_client.cpp | |||
| @@ -339,7 +339,7 @@ void UDPClient::StartCommunication(std::size_t client, const std::string& host, | |||
| 339 | } | 339 | } |
| 340 | } | 340 | } |
| 341 | 341 | ||
| 342 | const PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const { | 342 | PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const { |
| 343 | const std::size_t client = pad_index / PADS_PER_CLIENT; | 343 | const std::size_t client = pad_index / PADS_PER_CLIENT; |
| 344 | return { | 344 | return { |
| 345 | .guid = clients[client].uuid, | 345 | .guid = clients[client].uuid, |
| @@ -348,9 +348,9 @@ const PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const { | |||
| 348 | }; | 348 | }; |
| 349 | } | 349 | } |
| 350 | 350 | ||
| 351 | const Common::UUID UDPClient::GetHostUUID(const std::string host) const { | 351 | Common::UUID UDPClient::GetHostUUID(const std::string& host) const { |
| 352 | const auto ip = boost::asio::ip::address_v4::from_string(host); | 352 | const auto ip = boost::asio::ip::make_address_v4(host); |
| 353 | const auto hex_host = fmt::format("{:06x}", ip.to_ulong()); | 353 | const auto hex_host = fmt::format("{:06x}", ip.to_uint()); |
| 354 | return Common::UUID{hex_host}; | 354 | return Common::UUID{hex_host}; |
| 355 | } | 355 | } |
| 356 | 356 | ||
diff --git a/src/input_common/drivers/udp_client.h b/src/input_common/drivers/udp_client.h index 61a1fff37..30d7c2682 100644 --- a/src/input_common/drivers/udp_client.h +++ b/src/input_common/drivers/udp_client.h | |||
| @@ -145,8 +145,8 @@ private: | |||
| 145 | void OnPortInfo(Response::PortInfo); | 145 | void OnPortInfo(Response::PortInfo); |
| 146 | void OnPadData(Response::PadData, std::size_t client); | 146 | void OnPadData(Response::PadData, std::size_t client); |
| 147 | void StartCommunication(std::size_t client, const std::string& host, u16 port); | 147 | void StartCommunication(std::size_t client, const std::string& host, u16 port); |
| 148 | const PadIdentifier GetPadIdentifier(std::size_t pad_index) const; | 148 | PadIdentifier GetPadIdentifier(std::size_t pad_index) const; |
| 149 | const Common::UUID GetHostUUID(const std::string host) const; | 149 | Common::UUID GetHostUUID(const std::string& host) const; |
| 150 | 150 | ||
| 151 | Common::Input::ButtonNames GetUIButtonName(const Common::ParamPackage& params) const; | 151 | Common::Input::ButtonNames GetUIButtonName(const Common::ParamPackage& params) const; |
| 152 | 152 | ||