From 9f77c876f699ac28edd8a3d399fd1e605a62a9d8 Mon Sep 17 00:00:00 2001 From: David Cernat Date: Sat, 4 Jul 2020 16:52:52 +0300 Subject: [PATCH] [General] Fix warnings related to double to int conversion in MasterData --- components/openmw-mp/Master/MasterData.hpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/components/openmw-mp/Master/MasterData.hpp b/components/openmw-mp/Master/MasterData.hpp index 60feb2e76..d55174f92 100644 --- a/components/openmw-mp/Master/MasterData.hpp +++ b/components/openmw-mp/Master/MasterData.hpp @@ -57,17 +57,17 @@ struct QueryData const char *GetVersion() const { return rules.at("version").str.c_str(); } void SetVersion(const char *version) { rules["version"].str = version; } - int GetPlayers() const { return rules.at("players").val; } + int GetPlayers() const { return (int) rules.at("players").val; } void SetPlayers(int value) { rules["players"].val = value; } - int GetMaxPlayers() const { return rules.at("maxPlayers").val; } + int GetMaxPlayers() const { return (int) rules.at("maxPlayers").val; } void SetMaxPlayers(int value) { rules["maxPlayers"].val = value; } const char *GetGameMode() const { return rules.at("gamemode").str.c_str(); } void SetGameMode(const char *str) { rules["gamemode"].str = str; } void SetPassword(int value) { rules["passw"].val = value; }; - int GetPassword() const { return rules.at("passw").val; } + int GetPassword() const { return (int) rules.at("passw").val; } std::vector players;