[LINT] Fixed lint issues after clang-format update

This commit is contained in:
Gliniak 2024-06-13 20:56:56 +02:00
parent ce990e2828
commit ec267c348a
13 changed files with 21 additions and 28 deletions

View File

@ -183,11 +183,11 @@ class XmaContext {
}; };
virtual bool Work() { return false; }; virtual bool Work() { return false; };
virtual void Enable(){}; virtual void Enable() {};
virtual bool Block(bool poll) { return 0; }; virtual bool Block(bool poll) { return 0; };
virtual void Clear(){}; virtual void Clear() {};
virtual void Disable(){}; virtual void Disable() {};
virtual void Release(){}; virtual void Release() {};
Memory* memory() const { return memory_; } Memory* memory() const { return memory_; }

View File

@ -975,8 +975,7 @@ TEST_CASE("Create and Run Thread", "[thread]") {
thread = Thread::Create(params, [] { thread = Thread::Create(params, [] {
Thread::Exit(-1); Thread::Exit(-1);
FAIL("Function must not return"); FAIL("Function must not return");
while (true) while (true);
;
}); });
result = Wait(thread.get(), false, 1s); result = Wait(thread.get(), false, 1s);
REQUIRE(result == WaitResult::kSuccess); REQUIRE(result == WaitResult::kSuccess);
@ -992,8 +991,7 @@ TEST_CASE("Create and Run Thread", "[thread]") {
thread = Thread::Create(params, [] { thread = Thread::Create(params, [] {
Thread::Exit(-1); Thread::Exit(-1);
FAIL("Function must not return"); FAIL("Function must not return");
while (true) while (true);
;
}); });
REQUIRE(thread != nullptr); REQUIRE(thread != nullptr);
result = Wait(thread.get(), false, 1s); result = Wait(thread.get(), false, 1s);
@ -1128,8 +1126,7 @@ TEST_CASE("Test Thread QueueUserCallback", "[thread]") {
order++; // 2 order++; // 2
AlertableSleep(1s); AlertableSleep(1s);
FAIL("Thread should have been terminated during alertable sleep"); FAIL("Thread should have been terminated during alertable sleep");
while (true) while (true);
;
}); });
REQUIRE(!spin_wait_for(100ms, [&] { return order == 3; })); // timeout REQUIRE(!spin_wait_for(100ms, [&] { return order == 3; })); // timeout
thread->QueueUserCallback([] { Thread::Exit(0); }); thread->QueueUserCallback([] { Thread::Exit(0); });

View File

@ -82,7 +82,7 @@ class Backend {
uses uses
*/ */
virtual void DeinitializeBackendContext(void* ctx) {} virtual void DeinitializeBackendContext(void* ctx) {}
virtual void SetGuestRoundingMode(void* ctx, unsigned int mode){}; virtual void SetGuestRoundingMode(void* ctx, unsigned int mode) {};
/* /*
called by KeSetCurrentStackPointers in xboxkrnl_threading.cc just prior called by KeSetCurrentStackPointers in xboxkrnl_threading.cc just prior
to calling XThread::Reenter this is an opportunity for a backend to clear any to calling XThread::Reenter this is an opportunity for a backend to clear any

View File

@ -394,7 +394,7 @@ struct xex2_opt_bound_path {
struct xex2_opt_checksum_timedatestamp { struct xex2_opt_checksum_timedatestamp {
xe::be<uint32_t> checksum; // 0x0 sz:0x4 xe::be<uint32_t> checksum; // 0x0 sz:0x4
xe::be<uint32_t> timedatestamp; // 0x4 sz:0x4 xe::be<uint32_t> timedatestamp; // 0x4 sz:0x4
}; // size 8 }; // size 8
static_assert_size(xex2_opt_checksum_timedatestamp, 0x8); static_assert_size(xex2_opt_checksum_timedatestamp, 0x8);
struct xex2_opt_static_library { struct xex2_opt_static_library {

View File

@ -74,7 +74,7 @@ class UserData {
}; };
}; };
UserData(){}; UserData() {};
UserData(X_USER_DATA_TYPE type) { data_.type = type; } UserData(X_USER_DATA_TYPE type) { data_.type = type; }
virtual void Append(X_USER_DATA* data, DataByteStream* stream) { virtual void Append(X_USER_DATA* data, DataByteStream* stream) {

View File

@ -960,8 +960,7 @@ const uint32_t error_table_0xC0980001[] = {
0x00000037, // 0xC0980008 0x00000037, // 0xC0980008
}; };
#define MAKE_ENTRY(x) \ #define MAKE_ENTRY(x) {x, xe::countof(error_table_##x), error_table_##x}
{ x, xe::countof(error_table_##x), error_table_##x }
const error_lookup_table error_tables[] = { const error_lookup_table error_tables[] = {
MAKE_ENTRY(0x00000103), MAKE_ENTRY(0x40000002), MAKE_ENTRY(0x40020056), MAKE_ENTRY(0x00000103), MAKE_ENTRY(0x40000002), MAKE_ENTRY(0x40020056),
MAKE_ENTRY(0x400200AF), MAKE_ENTRY(0x80000001), MAKE_ENTRY(0x80000288), MAKE_ENTRY(0x400200AF), MAKE_ENTRY(0x80000001), MAKE_ENTRY(0x80000288),

View File

@ -151,15 +151,13 @@ static int RtlCompareStringN_impl(uint8_t* string_1, unsigned int string_1_len,
int case_insensitive) { int case_insensitive) {
if (string_1_len == 0xFFFFFFFF) { if (string_1_len == 0xFFFFFFFF) {
uint8_t* string1_strlen_iter = string_1; uint8_t* string1_strlen_iter = string_1;
while (*string1_strlen_iter++) while (*string1_strlen_iter++);
;
string_1_len = string_1_len =
static_cast<unsigned int>(string1_strlen_iter - string_1 - 1); static_cast<unsigned int>(string1_strlen_iter - string_1 - 1);
} }
if (string_2_len == 0xFFFFFFFF) { if (string_2_len == 0xFFFFFFFF) {
uint8_t* string2_strlen_iter = string_2; uint8_t* string2_strlen_iter = string_2;
while (*string2_strlen_iter++) while (*string2_strlen_iter++);
;
string_2_len = string_2_len =
static_cast<unsigned int>(string2_strlen_iter - string_2 - 1); static_cast<unsigned int>(string2_strlen_iter - string_2 - 1);
} }

View File

@ -520,8 +520,8 @@ X_STATUS XThread::Terminate(int exit_code) {
class reenter_exception { class reenter_exception {
public: public:
reenter_exception(uint32_t address) : address_(address){}; reenter_exception(uint32_t address) : address_(address) {};
virtual ~reenter_exception(){}; virtual ~reenter_exception() {};
uint32_t address() const { return address_; } uint32_t address() const { return address_; }
private: private:

View File

@ -51,7 +51,7 @@ struct PatchDataEntry {
const PatchDataValue data; const PatchDataValue data;
PatchDataEntry(const uint32_t memory_address, const PatchDataValue patch_data) PatchDataEntry(const uint32_t memory_address, const PatchDataValue patch_data)
: address(memory_address), data(patch_data){}; : address(memory_address), data(patch_data) {};
}; };
struct PatchInfoEntry { struct PatchInfoEntry {
@ -86,7 +86,7 @@ struct PatchData {
uint8_t size; uint8_t size;
PatchDataType type; PatchDataType type;
PatchData(uint8_t size_, PatchDataType type_) : size(size_), type(type_){}; PatchData(uint8_t size_, PatchDataType type_) : size(size_), type(type_) {};
}; };
class PatchDB { class PatchDB {

View File

@ -130,7 +130,7 @@ class AchievementNotificationWindow final : ImGuiNotification {
std::string title, std::string description, std::string title, std::string description,
uint8_t user_index, uint8_t position_id = 0) uint8_t user_index, uint8_t position_id = 0)
: ImGuiNotification(imgui_drawer, title, description, user_index, : ImGuiNotification(imgui_drawer, title, description, user_index,
position_id){}; position_id) {};
void OnDraw(ImGuiIO& io) override; void OnDraw(ImGuiIO& io) override;
}; };

View File

@ -202,8 +202,7 @@ const char* HostExceptionReport::GetFormattedAddress(uintptr_t address) {
size_t search_back = strlen(tmp_module_name); size_t search_back = strlen(tmp_module_name);
// hunt backwards for the last sep // hunt backwards for the last sep
while (tmp_module_name[--search_back] != '\\') while (tmp_module_name[--search_back] != '\\');
;
// MessageBoxA(nullptr, tmp_module_name, "ffds", MB_OK); // MessageBoxA(nullptr, tmp_module_name, "ffds", MB_OK);
sprintf_s(current_buffer, "%s+%llX", tmp_module_name + search_back + 1, sprintf_s(current_buffer, "%s+%llX", tmp_module_name + search_back + 1,

View File

@ -23,7 +23,7 @@ DiscZarchiveDevice::DiscZarchiveDevice(const std::string_view mount_path,
const std::filesystem::path& host_path) const std::filesystem::path& host_path)
: Device(mount_path), name_("GDFX"), host_path_(host_path), reader_() {} : Device(mount_path), name_("GDFX"), host_path_(host_path), reader_() {}
DiscZarchiveDevice::~DiscZarchiveDevice(){}; DiscZarchiveDevice::~DiscZarchiveDevice() {};
bool DiscZarchiveDevice::Initialize() { bool DiscZarchiveDevice::Initialize() {
reader_ = reader_ =

View File

@ -80,7 +80,7 @@ class XContentContainerDevice : public Device {
// multiple file. // multiple file.
virtual Result LoadHostFiles(FILE* header_file) = 0; virtual Result LoadHostFiles(FILE* header_file) = 0;
// Initialize any container specific fields. // Initialize any container specific fields.
virtual void SetupContainer(){}; virtual void SetupContainer() {};
Entry* ResolvePath(const std::string_view path); Entry* ResolvePath(const std::string_view path);
void CloseFiles(); void CloseFiles();