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

@@ -32,8 +32,9 @@ void MxLoopingSmkPresenter::Destroy(MxBool p_fromDestructor)
Init();
m_criticalSection.Leave();
if (!p_fromDestructor)
if (!p_fromDestructor) {
MxSmkPresenter::Destroy();
}
}
// FUNCTION: LEGO1 0x100b4a00
@@ -51,8 +52,9 @@ void MxLoopingSmkPresenter::NextFrame()
{
MxStreamChunk* chunk = NextChunk();
if (chunk->GetFlags() & MxDSChunk::c_end)
if (chunk->GetFlags() & MxDSChunk::c_end) {
ProgressTickleState(e_repeating);
}
else {
LoadFrame(chunk);
LoopChunk(chunk);
@@ -65,8 +67,9 @@ void MxLoopingSmkPresenter::NextFrame()
// FUNCTION: LEGO1 0x100b4a90
void MxLoopingSmkPresenter::VTable0x8c()
{
if (m_action->GetDuration() < m_elapsedDuration)
if (m_action->GetDuration() < m_elapsedDuration) {
ProgressTickleState(e_unk5);
}
else {
MxStreamChunk* chunk;
m_loopingChunkCursor->Current(chunk);
@@ -92,8 +95,9 @@ void MxLoopingSmkPresenter::RepeatingTickle()
time += 1000 / ((MxDSMediaAction*) m_action)->GetFramesPerSecond();
cursor.Reset();
while (cursor.Next(chunk))
while (cursor.Next(chunk)) {
chunk->SetTime(chunk->GetTime() + time);
}
m_loopingChunkCursor->Next();
}
@@ -101,15 +105,17 @@ void MxLoopingSmkPresenter::RepeatingTickle()
MxStreamChunk* chunk;
m_loopingChunkCursor->Current(chunk);
if (m_action->GetElapsedTime() < chunk->GetTime())
if (m_action->GetElapsedTime() < chunk->GetTime()) {
break;
}
VTable0x8c();
m_loopingChunkCursor->Next(chunk);
if (m_currentTickleState != e_repeating)
if (m_currentTickleState != e_repeating) {
break;
}
}
}