summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorAdmiral H. Curtiss <pikachu025@gmail.com>2023-11-03 16:34:50 +0100
committerGitHub <noreply@github.com>2023-11-03 16:34:50 +0100
commitc7243c368fa293a0ae11b2595c1ccf7cd83cc7e1 (patch)
tree882fa8f60655020480fa33ba9f16ed7b21785555 /Source/Core/Common
parent7dae4dd3d218b6e9245a6ee259bb2a50fb9bd48e (diff)
parentb18184209242c7ac37c2598f2622b430b4aed384 (diff)
Merge pull request #12270 from AdmiralCurtiss/clang-enum-out-of-range-2
Netplay: Fix building on clang 17.
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/ENet.cpp2
-rw-r--r--Source/Core/Common/ENet.h2
-rw-r--r--Source/Core/Common/TraversalClient.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/Common/ENet.cpp b/Source/Core/Common/ENet.cpp
index 6e27036175..f99c4476c5 100644
--- a/Source/Core/Common/ENet.cpp
+++ b/Source/Core/Common/ENet.cpp
@@ -31,7 +31,7 @@ int ENET_CALLBACK InterceptCallback(ENetHost* host, ENetEvent* event)
// wakeup packet received
if (host->receivedDataLength == 1 && host->receivedData[0] == 0)
{
- event->type = SKIPPABLE_EVENT;
+ event->type = static_cast<ENetEventType>(SKIPPABLE_EVENT);
return 1;
}
return 0;
diff --git a/Source/Core/Common/ENet.h b/Source/Core/Common/ENet.h
index 920a7d5fbd..a79a59e4a7 100644
--- a/Source/Core/Common/ENet.h
+++ b/Source/Core/Common/ENet.h
@@ -23,5 +23,5 @@ int ENET_CALLBACK InterceptCallback(ENetHost* host, ENetEvent* event);
bool SendPacket(ENetPeer* socket, const sf::Packet& packet, u8 channel_id);
// used for traversal packets and wake-up packets
-constexpr ENetEventType SKIPPABLE_EVENT = ENetEventType(42);
+constexpr int SKIPPABLE_EVENT = 42;
} // namespace Common::ENet
diff --git a/Source/Core/Common/TraversalClient.cpp b/Source/Core/Common/TraversalClient.cpp
index 50278a37e9..200166f69d 100644
--- a/Source/Core/Common/TraversalClient.cpp
+++ b/Source/Core/Common/TraversalClient.cpp
@@ -299,7 +299,7 @@ int ENET_CALLBACK TraversalClient::InterceptCallback(ENetHost* host, ENetEvent*
&host->receivedAddress) ||
(host->receivedDataLength == 1 && host->receivedData[0] == 0))
{
- event->type = Common::ENet::SKIPPABLE_EVENT;
+ event->type = static_cast<ENetEventType>(Common::ENet::SKIPPABLE_EVENT);
return 1;
}
return 0;