diff --git a/Source/Core/Core/NetPlayClient.h b/Source/Core/Core/NetPlayClient.h index c80afda9f7..f62e337eb7 100644 --- a/Source/Core/Core/NetPlayClient.h +++ b/Source/Core/Core/NetPlayClient.h @@ -121,8 +121,8 @@ protected: u32 m_current_game; - PadMapping m_pad_map[4]; - PadMapping m_wiimote_map[4]; + PadMappingArray m_pad_map; + PadMappingArray m_wiimote_map; bool m_is_recording; diff --git a/Source/Core/Core/NetPlayProto.h b/Source/Core/Core/NetPlayProto.h index 9434204621..7f81d18622 100644 --- a/Source/Core/Core/NetPlayProto.h +++ b/Source/Core/Core/NetPlayProto.h @@ -4,6 +4,7 @@ #pragma once +#include #include #include "Common/CommonTypes.h" #include "Core/HW/EXI_Device.h" @@ -77,8 +78,9 @@ enum using NetWiimote = std::vector; using MessageId = u8; using PlayerId = u8; -using PadMapping = s8; using FrameNum = u32; +using PadMapping = s8; +using PadMappingArray = std::array; namespace NetPlay { diff --git a/Source/Core/Core/NetPlayServer.cpp b/Source/Core/Core/NetPlayServer.cpp index ada7b3d8f9..d15c8ac338 100644 --- a/Source/Core/Core/NetPlayServer.cpp +++ b/Source/Core/Core/NetPlayServer.cpp @@ -74,8 +74,9 @@ NetPlayServer::NetPlayServer(const u16 port, bool traversal, const std::string& PanicAlertT("Enet Didn't Initialize"); } - memset(m_pad_map, -1, sizeof(m_pad_map)); - memset(m_wiimote_map, -1, sizeof(m_wiimote_map)); + m_pad_map.fill(-1); + m_wiimote_map.fill(-1); + if (traversal) { if (!EnsureTraversalClient(centralServer, centralPort)) diff --git a/Source/Core/Core/NetPlayServer.h b/Source/Core/Core/NetPlayServer.h index 842c795c38..360c4491ad 100644 --- a/Source/Core/Core/NetPlayServer.h +++ b/Source/Core/Core/NetPlayServer.h @@ -95,8 +95,8 @@ private: bool m_update_pings; u32 m_current_game; unsigned int m_target_buffer_size; - PadMapping m_pad_map[4]; - PadMapping m_wiimote_map[4]; + PadMappingArray m_pad_map; + PadMappingArray m_wiimote_map; std::map m_players;