summaryrefslogtreecommitdiff
path: root/src/input_common/drivers/udp_client.cpp
diff options
context:
space:
mode:
authorMorph <39850852+Morph1984@users.noreply.github.com>2022-01-25 16:15:27 -0500
committerGitHub <noreply@github.com>2022-01-25 16:15:27 -0500
commit306b3491c4dcab8bcba732c8aa387b20583d8904 (patch)
treec2eddc0b01689567c9abfd11f11d997a4f8b482f /src/input_common/drivers/udp_client.cpp
parent8dbad556ec84bafa7ea1b06d1f237a56c6e6f029 (diff)
parent87eb3cb0831139605bcf098c3324ed701881ec42 (diff)
Merge pull request #7773 from lioncash/udp-deprecated
input_common/udp_client: Replace deprecated from_string()/to_ulong() functions
Diffstat (limited to 'src/input_common/drivers/udp_client.cpp')
-rw-r--r--src/input_common/drivers/udp_client.cpp8
1 files changed, 4 insertions, 4 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,
}
}
-const PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const {
+PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const {
const std::size_t client = pad_index / PADS_PER_CLIENT;
return {
.guid = clients[client].uuid,
@@ -348,9 +348,9 @@ const PadIdentifier UDPClient::GetPadIdentifier(std::size_t pad_index) const {
};
}
-const Common::UUID UDPClient::GetHostUUID(const std::string host) const {
- const auto ip = boost::asio::ip::address_v4::from_string(host);
- const auto hex_host = fmt::format("{:06x}", ip.to_ulong());
+Common::UUID UDPClient::GetHostUUID(const std::string& host) const {
+ const auto ip = boost::asio::ip::make_address_v4(host);
+ const auto hex_host = fmt::format("{:06x}", ip.to_uint());
return Common::UUID{hex_host};
}