cmake+ci: run clang-tidy (#512)

* cmake+ci: run clang-tidy

* Remove DESCRIPTION from LEGO1/LegoOmni.mingw.def

* Add initial .clang-tidy and fixes

* fix file perms

* Comment out DESCRIPTION

* Remove LegoEntity::~LegoEntity and MxPresenter::~MxPresenter from mingw's LEGO1.def

* Looks like clang is allergic to the libs in the directx5 SDK

* Update .clang-tidy

* Fix typo in .clang-tidy

* Attempt to generate an action error

* Revert "Attempt to generate an action error"

This reverts commit 96c4c65fed.

* cmake: test with -Wparentheses + optionally with -Werror

* ci: -k0 is a Ninja argument

* Use -Werror only for msys2 builds

* cmake: only emit warnings for specific warnings

* cmake: and don't do -Werror/-WX anymore

* Fix warnings

* Fix mingw warnings

---------

Co-authored-by: Christian Semmler <mail@csemmler.com>
This commit is contained in:
Anonymous Maarten
2024-02-01 21:42:10 +01:00
committed by GitHub
parent 97d1ba7c71
commit 9e686e2a87
308 changed files with 2863 additions and 1995 deletions

View File

@@ -109,14 +109,17 @@ LegoResult LegoFile::Open(const char* p_name, LegoU32 p_mode)
strcat(mode, "r");
}
if (p_mode & c_write) {
if (m_mode != c_read)
if (m_mode != c_read) {
m_mode = c_write;
}
strcat(mode, "w");
}
if ((p_mode & c_text) != 0)
if ((p_mode & c_text) != 0) {
strcat(mode, "t");
else
}
else {
strcat(mode, "b");
}
if (!(m_file = fopen(p_name, mode))) {
return FAILURE;

View File

@@ -44,10 +44,10 @@ protected:
class LegoMemory : public LegoStorage {
public:
LegoMemory(void* p_buffer);
virtual LegoResult Read(void* p_buffer, LegoU32 p_size);
virtual LegoResult Write(const void* p_buffer, LegoU32 p_size);
virtual LegoResult GetPosition(LegoU32& p_position);
virtual LegoResult SetPosition(LegoU32 p_position);
LegoResult Read(void* p_buffer, LegoU32 p_size) override;
LegoResult Write(const void* p_buffer, LegoU32 p_size) override;
LegoResult GetPosition(LegoU32& p_position) override;
LegoResult SetPosition(LegoU32 p_position) override;
// SYNTHETIC: LEGO1 0x10045a80
// LegoMemory::~LegoMemory
@@ -65,11 +65,11 @@ protected:
class LegoFile : public LegoStorage {
public:
LegoFile();
virtual ~LegoFile() override;
virtual LegoResult Read(void* p_buffer, LegoU32 p_size);
virtual LegoResult Write(const void* p_buffer, LegoU32 p_size);
virtual LegoResult GetPosition(LegoU32& p_position);
virtual LegoResult SetPosition(LegoU32 p_position);
~LegoFile() override;
LegoResult Read(void* p_buffer, LegoU32 p_size) override;
LegoResult Write(const void* p_buffer, LegoU32 p_size) override;
LegoResult GetPosition(LegoU32& p_position) override;
LegoResult SetPosition(LegoU32 p_position) override;
LegoResult Open(const char* p_name, LegoU32 p_mode);
// FUNCTION: LEGO1 0x10006030