diff --git a/src/Components/Modules/Logger.cpp b/src/Components/Modules/Logger.cpp index b87a7813..e355a95e 100644 --- a/src/Components/Modules/Logger.cpp +++ b/src/Components/Modules/Logger.cpp @@ -7,7 +7,7 @@ namespace Components std::vector Logger::MessageQueue; std::vector Logger::LoggingAddresses[2]; - std::function Logger::PipeCallback; + void(*Logger::PipeCallback)(const std::string&) = nullptr;; bool Logger::IsConsoleReady() { @@ -125,7 +125,7 @@ namespace Components } } - void Logger::PipeOutput(const std::function& callback) + void Logger::PipeOutput(void(*callback)(const std::string&)) { PipeCallback = callback; } diff --git a/src/Components/Modules/Logger.hpp b/src/Components/Modules/Logger.hpp index 2aeace2b..8bc8f454 100644 --- a/src/Components/Modules/Logger.hpp +++ b/src/Components/Modules/Logger.hpp @@ -12,7 +12,7 @@ namespace Components static void Print_Stub(int channel, const char* message, ...); - static void PipeOutput(const std::function& callback); + static void PipeOutput(void(*callback)(const std::string&)); static void PrintInternal(Game::conChannel_t channel, const std::string_view& fmt, std::format_args&& args); static void ErrorInternal(Game::errorParm_t error, const std::string_view& fmt, std::format_args&& args); @@ -112,7 +112,7 @@ namespace Components static std::vector MessageQueue; static std::vector LoggingAddresses[2]; - static std::function PipeCallback; + static void(*PipeCallback)(const std::string&); static void MessagePrint(int channel, const std::string& msg); diff --git a/src/Components/Modules/RCon.cpp b/src/Components/Modules/RCon.cpp index 52e549ce..56cf17ba 100644 --- a/src/Components/Modules/RCon.cpp +++ b/src/Components/Modules/RCon.cpp @@ -76,7 +76,7 @@ namespace Components bool RCon::RateLimitCheck(const Network::Address& address, const int time) { - auto ip = address.getIP(); + const auto ip = address.getIP(); if (!RateLimit.contains(ip.full)) { diff --git a/src/Game/Structs.hpp b/src/Game/Structs.hpp index 8b12092c..f27366c1 100644 --- a/src/Game/Structs.hpp +++ b/src/Game/Structs.hpp @@ -6443,7 +6443,7 @@ namespace Game typedef union { unsigned char bytes[4]; - DWORD full; + std::uint32_t full; } netIP_t; struct netadr_t