From ec407bd3f1988c6f5d147307c662703c7bc94751 Mon Sep 17 00:00:00 2001 From: FearlessTobi Date: Mon, 11 Jul 2022 20:40:57 +0200 Subject: Fix compilation on linux gcc --- src/web_service/announce_room_json.cpp | 8 ++++---- src/web_service/announce_room_json.h | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-) (limited to 'src/web_service') diff --git a/src/web_service/announce_room_json.cpp b/src/web_service/announce_room_json.cpp index 32249f28e..984a59f77 100644 --- a/src/web_service/announce_room_json.cpp +++ b/src/web_service/announce_room_json.cpp @@ -11,7 +11,7 @@ namespace AnnounceMultiplayerRoom { -void to_json(nlohmann::json& json, const Room::Member& member) { +static void to_json(nlohmann::json& json, const Room::Member& member) { if (!member.username.empty()) { json["username"] = member.username; } @@ -23,7 +23,7 @@ void to_json(nlohmann::json& json, const Room::Member& member) { json["gameId"] = member.game_id; } -void from_json(const nlohmann::json& json, Room::Member& member) { +static void from_json(const nlohmann::json& json, Room::Member& member) { member.nickname = json.at("nickname").get(); member.game_name = json.at("gameName").get(); member.game_id = json.at("gameId").get(); @@ -36,7 +36,7 @@ void from_json(const nlohmann::json& json, Room::Member& member) { } } -void to_json(nlohmann::json& json, const Room& room) { +static void to_json(nlohmann::json& json, const Room& room) { json["port"] = room.port; json["name"] = room.name; if (!room.description.empty()) { @@ -53,7 +53,7 @@ void to_json(nlohmann::json& json, const Room& room) { } } -void from_json(const nlohmann::json& json, Room& room) { +static void from_json(const nlohmann::json& json, Room& room) { room.verify_UID = json.at("externalGuid").get(); room.ip = json.at("address").get(); room.name = json.at("name").get(); diff --git a/src/web_service/announce_room_json.h b/src/web_service/announce_room_json.h index ac02af5b1..f65c93214 100644 --- a/src/web_service/announce_room_json.h +++ b/src/web_service/announce_room_json.h @@ -17,8 +17,8 @@ namespace WebService { */ class RoomJson : public AnnounceMultiplayerRoom::Backend { public: - RoomJson(const std::string& host, const std::string& username, const std::string& token) - : client(host, username, token), host(host), username(username), token(token) {} + RoomJson(const std::string& host_, const std::string& username_, const std::string& token_) + : client(host_, username_, token_), host(host_), username(username_), token(token_) {} ~RoomJson() = default; void SetRoomInformation(const std::string& name, const std::string& description, const u16 port, const u32 max_player, const u32 net_version, const bool has_password, -- cgit v1.2.3