summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2017-07-26 21:59:43 +0200
committerGitHub <noreply@github.com>2017-07-26 21:59:43 +0200
commit7dbe3c18f1127ecbdc74cedb5790302b713b0999 (patch)
treeca959b2c11f5732004b08afd3c6d12f20199106d
parentMerge pull request #2844 from jroweboy/nightlyfix (diff)
parentNetwork: Moved NintendoOUI initalization to RoomMember constructor (diff)
downloadyuzu-7dbe3c18f1127ecbdc74cedb5790302b713b0999.tar
yuzu-7dbe3c18f1127ecbdc74cedb5790302b713b0999.tar.gz
yuzu-7dbe3c18f1127ecbdc74cedb5790302b713b0999.tar.bz2
yuzu-7dbe3c18f1127ecbdc74cedb5790302b713b0999.tar.lz
yuzu-7dbe3c18f1127ecbdc74cedb5790302b713b0999.tar.xz
yuzu-7dbe3c18f1127ecbdc74cedb5790302b713b0999.tar.zst
yuzu-7dbe3c18f1127ecbdc74cedb5790302b713b0999.zip
-rw-r--r--src/network/room.cpp5
-rw-r--r--src/network/room.h2
2 files changed, 4 insertions, 3 deletions
diff --git a/src/network/room.cpp b/src/network/room.cpp
index 8b7915bb7..fbbaf8b93 100644
--- a/src/network/room.cpp
+++ b/src/network/room.cpp
@@ -19,7 +19,7 @@ static constexpr u32 MaxConcurrentConnections = 10;
class Room::RoomImpl {
public:
// This MAC address is used to generate a 'Nintendo' like Mac address.
- const MacAddress NintendoOUI = {0x00, 0x1F, 0x32, 0x00, 0x00, 0x00};
+ const MacAddress NintendoOUI;
std::mt19937 random_gen; ///< Random number generator. Used for GenerateMacAddress
ENetHost* server = nullptr; ///< Network interface.
@@ -36,7 +36,8 @@ public:
using MemberList = std::vector<Member>;
MemberList members; ///< Information about the members of this room.
- RoomImpl() : random_gen(std::random_device()()) {}
+ RoomImpl()
+ : random_gen(std::random_device()()), NintendoOUI{0x00, 0x1F, 0x32, 0x00, 0x00, 0x00} {}
/// Thread that receives and dispatches network packets
std::unique_ptr<std::thread> room_thread;
diff --git a/src/network/room.h b/src/network/room.h
index 54cccf0ae..65b0d008a 100644
--- a/src/network/room.h
+++ b/src/network/room.h
@@ -24,7 +24,7 @@ struct RoomInformation {
using MacAddress = std::array<u8, 6>;
/// A special MAC address that tells the room we're joining to assign us a MAC address
/// automatically.
-const MacAddress NoPreferredMac = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
+constexpr MacAddress NoPreferredMac = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};
// 802.11 broadcast MAC address
constexpr MacAddress BroadcastMac = {0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF};