From abf8412629d6369e772f8acac05df8b8d0a5fd53 Mon Sep 17 00:00:00 2001 From: Gabriel Camargo Date: Tue, 10 Sep 2024 05:45:32 -0300 Subject: [PATCH] :adhesive_bandage: fix: typedef struct --- core/cache/cache.h | 3 ++- core/entities/config.h | 16 ++++++++-------- core/entities/user.h | 2 +- core/manager/manager.h | 2 +- 4 files changed, 12 insertions(+), 11 deletions(-) diff --git a/core/cache/cache.h b/core/cache/cache.h index 1bbcb22..832488d 100644 --- a/core/cache/cache.h +++ b/core/cache/cache.h @@ -27,9 +27,10 @@ #include #include #include + #include #include - typedef struct CacheStruct { + struct CacheStruct { std::string value; int expire; diff --git a/core/entities/config.h b/core/entities/config.h index 252e2d3..5a81b78 100644 --- a/core/entities/config.h +++ b/core/entities/config.h @@ -28,26 +28,26 @@ #include #include - typedef struct { + struct ConfigConnectBasicAuth{ std::string user; std::string pass; std::string db; - } ConfigConnectBasicAuth; + }; - typedef struct { + struct ConfigConnectAuth{ std::vector allow_ip; std::vector basic; - } ConfigConnectAuth; + }; - typedef struct { + struct ConfigConnect{ int max_clients; ConfigConnectAuth auth; - } ConfigConnect; + }; - typedef struct { + struct ConfigHosting{ std::string address; short port; - } ConfigHosting; + }; class Config { public: diff --git a/core/entities/user.h b/core/entities/user.h index 6959a66..bdcf64b 100644 --- a/core/entities/user.h +++ b/core/entities/user.h @@ -24,7 +24,7 @@ #include - typedef struct UserEntities { + struct UserEntities { std::string user; std::string db; }; diff --git a/core/manager/manager.h b/core/manager/manager.h index c658c87..b6b972b 100644 --- a/core/manager/manager.h +++ b/core/manager/manager.h @@ -34,7 +34,7 @@ #include "../entities/user.h" #include "../entities/config.h" - typedef struct ManagerCommands { + struct ManagerCommands { std::vector set = {"SET", "set"}; std::vector del = {"DEL", "del"}; std::vector get = {"GET", "get"};