From 214626222cb055d48d29289a0f1c28775a588440 Mon Sep 17 00:00:00 2001 From: Aaron Kimbre Date: Fri, 26 Apr 2024 06:17:54 -0500 Subject: [PATCH] address feedback --- dChatServer/ChatWebApi.cpp | 4 +++- dChatServer/PlayerContainer.cpp | 4 +++- dChatServer/PlayerContainer.h | 4 ++-- dCommon/json.h | 10 ---------- 4 files changed, 8 insertions(+), 14 deletions(-) delete mode 100644 dCommon/json.h diff --git a/dChatServer/ChatWebApi.cpp b/dChatServer/ChatWebApi.cpp index 6b864d45..d2642f1f 100644 --- a/dChatServer/ChatWebApi.cpp +++ b/dChatServer/ChatWebApi.cpp @@ -10,7 +10,9 @@ #include "PlayerContainer.h" #include "dConfig.h" #include "httplib.h" -#include "json.h" +#include "nlohmann/json.hpp" + +using json = nlohmann::json; namespace { httplib::Server m_APIServer; diff --git a/dChatServer/PlayerContainer.cpp b/dChatServer/PlayerContainer.cpp index be122542..cffb5c7e 100644 --- a/dChatServer/PlayerContainer.cpp +++ b/dChatServer/PlayerContainer.cpp @@ -13,7 +13,9 @@ #include "eConnectionType.h" #include "ChatPackets.h" #include "dConfig.h" -#include "eChatMessageType.h" +#include "eChatMessageType.h" + +using json = nlohmann::json; const json PlayerData::to_json() const { json data; diff --git a/dChatServer/PlayerContainer.h b/dChatServer/PlayerContainer.h index 55fb2997..2bd675a2 100644 --- a/dChatServer/PlayerContainer.h +++ b/dChatServer/PlayerContainer.h @@ -6,7 +6,7 @@ #include "Game.h" #include "dServer.h" #include -#include "json.h" +#include "nlohmann/json.hpp" enum class eGameMasterLevel : uint8_t; @@ -37,7 +37,7 @@ struct PlayerData { return muteExpire == 1 || muteExpire > time(NULL); } - const json to_json() const; + const nlohmann::json to_json() const; SystemAddress sysAddr{}; LWOZONEID zoneID{}; diff --git a/dCommon/json.h b/dCommon/json.h deleted file mode 100644 index 0ce06dc7..00000000 --- a/dCommon/json.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __JSON__H__ -#define __JSON__H__ - -#include "nlohmann/json.hpp" - -namespace { - using json = nlohmann::json; -} - -#endif // !__JSON__H__ \ No newline at end of file