mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-06 13:00:15 +02:00
Whole-tree reformat with clang-format-19
This commit is contained in:
1 parent
3c7ece2ef3
commit
5267cde60e
31 files changed
+260
-273
No files matched your search
@@ -75,7 +75,7 @@ enum class LayerType {
|
||||
};
|
||||
|
||||
template<typename PairTypes, typename ArrayPairType>
|
||||
static inline std::optional<fextl::string> EnumParser(const ArrayPairType& EnumPairs, std::string_view const View) {
|
||||
static inline std::optional<fextl::string> EnumParser(const ArrayPairType& EnumPairs, const std::string_view View) {
|
||||
uint64_t EnumMask {};
|
||||
auto Results = std::from_chars(View.data(), View.data() + View.size(), EnumMask);
|
||||
if (Results.ec == std::errc()) {
|
||||
|
||||
@@ -107,14 +107,12 @@ enum IndexNamedVectorConstant : uint8_t {
|
||||
struct SHA256Sum final {
|
||||
uint8_t data[32];
|
||||
[[nodiscard]]
|
||||
bool
|
||||
operator<(const SHA256Sum& rhs) const {
|
||||
bool operator<(const SHA256Sum& rhs) const {
|
||||
return memcmp(data, rhs.data, sizeof(data)) < 0;
|
||||
}
|
||||
|
||||
[[nodiscard]]
|
||||
bool
|
||||
operator==(const SHA256Sum& rhs) const {
|
||||
bool operator==(const SHA256Sum& rhs) const {
|
||||
return memcmp(data, rhs.data, sizeof(data)) == 0;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -12,20 +12,17 @@ namespace FEXCore {
|
||||
// boilerplate.
|
||||
#define FEX_DECLARE_ENUM_FLAG_OPERATORS(type) \
|
||||
[[nodiscard]] \
|
||||
constexpr type \
|
||||
operator|(type a, type b) noexcept { \
|
||||
constexpr type operator|(type a, type b) noexcept { \
|
||||
using T = std::underlying_type_t<type>; \
|
||||
return static_cast<type>(static_cast<T>(a) | static_cast<T>(b)); \
|
||||
} \
|
||||
[[nodiscard]] \
|
||||
constexpr type \
|
||||
operator&(type a, type b) noexcept { \
|
||||
constexpr type operator&(type a, type b) noexcept { \
|
||||
using T = std::underlying_type_t<type>; \
|
||||
return static_cast<type>(static_cast<T>(a) & static_cast<T>(b)); \
|
||||
} \
|
||||
[[nodiscard]] \
|
||||
constexpr type \
|
||||
operator^(type a, type b) noexcept { \
|
||||
constexpr type operator^(type a, type b) noexcept { \
|
||||
using T = std::underlying_type_t<type>; \
|
||||
return static_cast<type>(static_cast<T>(a) ^ static_cast<T>(b)); \
|
||||
} \
|
||||
@@ -42,8 +39,7 @@ namespace FEXCore {
|
||||
return a; \
|
||||
} \
|
||||
[[nodiscard]] \
|
||||
constexpr type \
|
||||
operator~(type key) noexcept { \
|
||||
constexpr type operator~(type key) noexcept { \
|
||||
using T = std::underlying_type_t<type>; \
|
||||
return static_cast<type>(~static_cast<T>(key)); \
|
||||
} \
|
||||
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
#endif
|
||||
}
|
||||
|
||||
ssize_t Write(std::string_view const Data) {
|
||||
ssize_t Write(const std::string_view Data) {
|
||||
return Write(Data.data(), Data.size());
|
||||
}
|
||||
|
||||
|
||||
@@ -141,10 +141,10 @@ namespace Msg {
|
||||
} \
|
||||
} while (0);
|
||||
|
||||
#define ERROR_AND_DIE_FMT(...) \
|
||||
do { \
|
||||
#define ERROR_AND_DIE_FMT(...) \
|
||||
do { \
|
||||
LogMan::Msg::MFmt(LogMan::ASSERT, __VA_ARGS__); \
|
||||
FEX_TRAP_EXECUTION; \
|
||||
FEX_TRAP_EXECUTION; \
|
||||
} while (0)
|
||||
|
||||
} // namespace Msg
|
||||
|
||||
@@ -81,8 +81,8 @@ FEX_DEFAULT_VISIBILITY void Init(std::string_view ProgramName, std::string_view
|
||||
FEX_DEFAULT_VISIBILITY void PostForkAction(bool IsChild);
|
||||
FEX_DEFAULT_VISIBILITY bool IsActive();
|
||||
FEX_DEFAULT_VISIBILITY void Shutdown();
|
||||
FEX_DEFAULT_VISIBILITY void TraceObject(std::string_view const Format);
|
||||
FEX_DEFAULT_VISIBILITY void TraceObject(std::string_view const Format, uint64_t Duration);
|
||||
FEX_DEFAULT_VISIBILITY void TraceObject(const std::string_view Format);
|
||||
FEX_DEFAULT_VISIBILITY void TraceObject(const std::string_view Format, uint64_t Duration);
|
||||
|
||||
#define UniqueScopeName2(name, line) name##line
|
||||
#define UniqueScopeName(name, line) UniqueScopeName2(name, line)
|
||||
@@ -97,13 +97,13 @@ FEX_DEFAULT_VISIBILITY void TraceObject(std::string_view const Format, uint64_t
|
||||
// A class that follows scoping rules to generate a profile duration block
|
||||
class ProfilerBlock final {
|
||||
public:
|
||||
ProfilerBlock(std::string_view const Format);
|
||||
ProfilerBlock(const std::string_view Format);
|
||||
|
||||
~ProfilerBlock();
|
||||
|
||||
private:
|
||||
uint64_t DurationBegin;
|
||||
std::string_view const Format;
|
||||
const std::string_view Format;
|
||||
};
|
||||
|
||||
// Declare a scoped profile block variable with a fixed name.
|
||||
@@ -148,9 +148,9 @@ static void PostForkAction(bool IsChild) {}
|
||||
[[maybe_unused]]
|
||||
static void Shutdown() {}
|
||||
[[maybe_unused]]
|
||||
static void TraceObject(std::string_view const Format) {}
|
||||
static void TraceObject(const std::string_view Format) {}
|
||||
[[maybe_unused]]
|
||||
static void TraceObject(std::string_view const, uint64_t) {}
|
||||
static void TraceObject(const std::string_view, uint64_t) {}
|
||||
|
||||
#define FEXCORE_PROFILE_INSTANT(...) \
|
||||
do { \
|
||||
|
||||
Reference in new issue
Block a user