diff --git a/FEXCore/Source/Common/JitSymbols.h b/FEXCore/Source/Common/JitSymbols.h index 3fc2502f5..a688b2f7b 100644 --- a/FEXCore/Source/Common/JitSymbols.h +++ b/FEXCore/Source/Common/JitSymbols.h @@ -2,12 +2,10 @@ #pragma once #include -#include #include +#include #include -#include -#include #include namespace FEXCore { diff --git a/FEXCore/include/FEXCore/Utils/LogManager.h b/FEXCore/include/FEXCore/Utils/LogManager.h index 3b74a693f..64093db8b 100644 --- a/FEXCore/include/FEXCore/Utils/LogManager.h +++ b/FEXCore/include/FEXCore/Utils/LogManager.h @@ -9,7 +9,7 @@ #include namespace LogMan { -enum DebugLevels { +enum DebugLevels : uint32_t { NONE = 0, ///< Expect zero messages ASSERT = 1, ///< Assert throwing ERROR = 2, ///< Only Errors printed diff --git a/Source/Common/CPUInfo.h b/Source/Common/CPUInfo.h index 9e56a7d1f..10cda7cbb 100644 --- a/Source/Common/CPUInfo.h +++ b/Source/Common/CPUInfo.h @@ -1,6 +1,5 @@ // SPDX-License-Identifier: MIT #pragma once -#include #include diff --git a/Source/Common/Config.cpp b/Source/Common/Config.cpp index 9d840f98b..7409faa3c 100644 --- a/Source/Common/Config.cpp +++ b/Source/Common/Config.cpp @@ -12,10 +12,12 @@ #include #include +#include #ifndef _WIN32 #include #include #endif +#include #include #include diff --git a/Source/Common/Config.h b/Source/Common/Config.h index 13e9cc47c..e0eaea5e0 100644 --- a/Source/Common/Config.h +++ b/Source/Common/Config.h @@ -1,7 +1,13 @@ // SPDX-License-Identifier: MIT #pragma once + #include +#include #include +#include +#include + +#include namespace FEX::ArgLoader { class ArgLoader; diff --git a/Source/Common/FDUtils.h b/Source/Common/FDUtils.h index 9081281cd..f4e1d6bb4 100644 --- a/Source/Common/FDUtils.h +++ b/Source/Common/FDUtils.h @@ -1,15 +1,10 @@ // SPDX-License-Identifier: MIT #pragma once -#include -#include #include -#include #include -#include #include -#include #include namespace FEX { diff --git a/Source/Common/FEXServerClient.cpp b/Source/Common/FEXServerClient.cpp index 6582d6c07..f77c5eb3d 100644 --- a/Source/Common/FEXServerClient.cpp +++ b/Source/Common/FEXServerClient.cpp @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -27,6 +28,17 @@ #include namespace FEXServerClient { +Logging::PacketHeader Logging::FillHeader(PacketTypes Type) { + Logging::PacketHeader Msg { + .PacketType = Type, + .PID = ::getpid(), + .TID = FHU::Syscalls::gettid(), + }; + clock_gettime(CLOCK_MONOTONIC, &Msg.Timestamp); + + return Msg; +} + int RequestPIDFDPacket(int ServerSocket, PacketType Type) { fasio::tcp_socket Socket {ServerSocket}; FEXServerRequestPacket Req { diff --git a/Source/Common/FEXServerClient.h b/Source/Common/FEXServerClient.h index 095885043..5bf30dde1 100644 --- a/Source/Common/FEXServerClient.h +++ b/Source/Common/FEXServerClient.h @@ -1,9 +1,16 @@ // SPDX-License-Identifier: MIT #pragma once -#include #include -#include + +#include +#include +#include +#include + +namespace LogMan { +enum DebugLevels : uint32_t; +} namespace FEXServerClient { enum class PacketType { @@ -134,18 +141,7 @@ namespace Logging { static_assert(sizeof(PacketHeader) == 32, "Wrong size"); - [[maybe_unused]] - static PacketHeader FillHeader(Logging::PacketTypes Type) { - - Logging::PacketHeader Msg { - .PacketType = Type, - .PID = ::getpid(), - .TID = FHU::Syscalls::gettid(), - }; - clock_gettime(CLOCK_MONOTONIC, &Msg.Timestamp); - - return Msg; - } + PacketHeader FillHeader(PacketTypes Type); } // namespace Logging void MsgHandler(int FD, LogMan::DebugLevels Level, const char* Message); diff --git a/Source/Common/JSONPool.h b/Source/Common/JSONPool.h index 952943485..0653e9e9c 100644 --- a/Source/Common/JSONPool.h +++ b/Source/Common/JSONPool.h @@ -1,8 +1,8 @@ // SPDX-License-Identifier: MIT -#include #include +#include #include namespace FEX::JSON { @@ -14,10 +14,10 @@ struct JsonAllocator : jsonPool_t { template const json_t* CreateJSON(T& Container, JsonAllocator& Allocator) { - if (Container.empty()) { + if (std::empty(Container)) { return nullptr; } - return json_createWithPool(&Container.at(0), &Allocator); + return json_createWithPool(std::data(Container), &Allocator); } } // namespace FEX::JSON diff --git a/Source/Common/StringUtil.cpp b/Source/Common/StringUtil.cpp index 5533fe37f..9b0ea8238 100644 --- a/Source/Common/StringUtil.cpp +++ b/Source/Common/StringUtil.cpp @@ -1,6 +1,8 @@ // SPDX-License-Identifier: MIT #include "Common/StringUtil.h" +#include + namespace FEX::StringUtil { void ltrim(fextl::string& s) { s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](int ch) { return !std::isspace(ch); })); diff --git a/Source/Common/StringUtil.h b/Source/Common/StringUtil.h index 62c2eddda..357c6f218 100644 --- a/Source/Common/StringUtil.h +++ b/Source/Common/StringUtil.h @@ -1,8 +1,7 @@ // SPDX-License-Identifier: MIT #pragma once -#include -#include +#include namespace FEX::StringUtil { void ltrim(fextl::string& s); diff --git a/Source/Common/VolatileMetadata.cpp b/Source/Common/VolatileMetadata.cpp index d334e2ecf..52de3b9fb 100644 --- a/Source/Common/VolatileMetadata.cpp +++ b/Source/Common/VolatileMetadata.cpp @@ -1,6 +1,10 @@ // SPDX-License-Identifier: MIT #include "Common/VolatileMetadata.h" +#include + +#include + #include #include diff --git a/Source/Common/VolatileMetadata.h b/Source/Common/VolatileMetadata.h index 21df597c6..e131e9dc2 100644 --- a/Source/Common/VolatileMetadata.h +++ b/Source/Common/VolatileMetadata.h @@ -1,10 +1,13 @@ // SPDX-License-Identifier: MIT #pragma once + #include #include #include #include +#include + namespace FEX::VolatileMetadata { struct ExtendedVolatileMetadata { FEXCore::IntervalList VolatileValidRanges; diff --git a/Source/Tools/FEXServer/SquashFS.cpp b/Source/Tools/FEXServer/SquashFS.cpp index f6af78dd6..3d140586b 100644 --- a/Source/Tools/FEXServer/SquashFS.cpp +++ b/Source/Tools/FEXServer/SquashFS.cpp @@ -5,10 +5,12 @@ #include #include #include +#include #include #include #include +#include #include #include