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

@@ -21,8 +21,9 @@ public:
MxDSAction* oldAction = p_action;
this->m_realloc = p_reallocAction;
if (p_reallocAction)
if (p_reallocAction) {
this->m_action = new MxDSAction();
}
else {
this->m_action = oldAction;
return;
@@ -34,17 +35,19 @@ public:
}
// FUNCTION: LEGO1 0x10051050
inline virtual ~MxActionNotificationParam() override
inline ~MxActionNotificationParam() override
{
if (!this->m_realloc)
if (!this->m_realloc) {
return;
}
if (this->m_action)
if (this->m_action) {
delete this->m_action;
}
}
// FUNCTION: LEGO1 0x100510c0
virtual MxNotificationParam* Clone() override
MxNotificationParam* Clone() override
{
return new MxActionNotificationParam(this->m_type, this->m_sender, this->m_action, this->m_realloc);
} // vtable+0x04
@@ -70,7 +73,7 @@ public:
{
}
virtual MxNotificationParam* Clone() override; // vtable+0x04
MxNotificationParam* Clone() override; // vtable+0x04
};
// VTABLE: LEGO1 0x100d8358
@@ -88,7 +91,7 @@ public:
}
// FUNCTION: LEGO1 0x10051270
virtual MxNotificationParam* Clone() override
MxNotificationParam* Clone() override
{
return new MxEndActionNotificationParam(
c_notificationEndAction,
@@ -109,7 +112,7 @@ public:
m_unk0x14 = p_unk0x14;
}
virtual MxNotificationParam* Clone() override; // vtable+0x04
MxNotificationParam* Clone() override; // vtable+0x04
private:
MxPresenter* m_unk0x14; // 0x14