summaryrefslogtreecommitdiffstats
path: root/src/web_service/announce_room_json.cpp
diff options
context:
space:
mode:
authorFearlessTobi <thm.frey@gmail.com>2022-07-11 20:40:57 +0200
committerFearlessTobi <thm.frey@gmail.com>2022-07-25 21:59:30 +0200
commitec407bd3f1988c6f5d147307c662703c7bc94751 (patch)
tree8792652886c6b9250bea7e609b9828d9a94d3e31 /src/web_service/announce_room_json.cpp
parentweb_service: Fix -Wmissing-field-initializers (diff)
downloadyuzu-ec407bd3f1988c6f5d147307c662703c7bc94751.tar
yuzu-ec407bd3f1988c6f5d147307c662703c7bc94751.tar.gz
yuzu-ec407bd3f1988c6f5d147307c662703c7bc94751.tar.bz2
yuzu-ec407bd3f1988c6f5d147307c662703c7bc94751.tar.lz
yuzu-ec407bd3f1988c6f5d147307c662703c7bc94751.tar.xz
yuzu-ec407bd3f1988c6f5d147307c662703c7bc94751.tar.zst
yuzu-ec407bd3f1988c6f5d147307c662703c7bc94751.zip
Diffstat (limited to 'src/web_service/announce_room_json.cpp')
-rw-r--r--src/web_service/announce_room_json.cpp8
1 files changed, 4 insertions, 4 deletions
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<std::string>();
member.game_name = json.at("gameName").get<std::string>();
member.game_id = json.at("gameId").get<u64>();
@@ -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<std::string>();
room.ip = json.at("address").get<std::string>();
room.name = json.at("name").get<std::string>();