mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-25 09:24:17 +00:00
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:
committed by
GitHub
parent
97d1ba7c71
commit
9e686e2a87
@@ -23,8 +23,9 @@ void MxDSParallelAction::CopyFrom(MxDSParallelAction& p_dsParallelAction)
|
||||
// FUNCTION: LEGO1 0x100cb0a0
|
||||
MxDSParallelAction& MxDSParallelAction::operator=(MxDSParallelAction& p_dsParallelAction)
|
||||
{
|
||||
if (this == &p_dsParallelAction)
|
||||
if (this == &p_dsParallelAction) {
|
||||
return *this;
|
||||
}
|
||||
|
||||
MxDSMultiAction::operator=(p_dsParallelAction);
|
||||
this->CopyFrom(p_dsParallelAction);
|
||||
@@ -36,8 +37,9 @@ MxDSAction* MxDSParallelAction::Clone()
|
||||
{
|
||||
MxDSParallelAction* clone = new MxDSParallelAction();
|
||||
|
||||
if (clone)
|
||||
if (clone) {
|
||||
*clone = *this;
|
||||
}
|
||||
|
||||
return clone;
|
||||
}
|
||||
@@ -45,15 +47,17 @@ MxDSAction* MxDSParallelAction::Clone()
|
||||
// FUNCTION: LEGO1 0x100cb160
|
||||
MxLong MxDSParallelAction::GetDuration()
|
||||
{
|
||||
if (this->m_duration)
|
||||
if (this->m_duration) {
|
||||
return this->m_duration;
|
||||
}
|
||||
|
||||
MxDSActionListCursor cursor(this->m_actions);
|
||||
MxDSAction* action;
|
||||
|
||||
while (cursor.Next(action)) {
|
||||
if (!action)
|
||||
if (!action) {
|
||||
continue;
|
||||
}
|
||||
|
||||
MxLong duration = action->GetDuration();
|
||||
if (duration == -1) {
|
||||
@@ -65,10 +69,12 @@ MxLong MxDSParallelAction::GetDuration()
|
||||
if (action->IsA("MxDSMediaAction")) {
|
||||
MxLong sustainTime = ((MxDSMediaAction*) action)->GetSustainTime();
|
||||
|
||||
if (sustainTime == -1)
|
||||
if (sustainTime == -1) {
|
||||
duration = -1;
|
||||
else if (sustainTime)
|
||||
}
|
||||
else if (sustainTime) {
|
||||
duration += sustainTime;
|
||||
}
|
||||
}
|
||||
|
||||
if (duration == -1) {
|
||||
@@ -76,12 +82,14 @@ MxLong MxDSParallelAction::GetDuration()
|
||||
break;
|
||||
}
|
||||
|
||||
if (this->m_duration < duration)
|
||||
if (this->m_duration < duration) {
|
||||
this->m_duration = duration;
|
||||
}
|
||||
}
|
||||
|
||||
if (this->IsBit3())
|
||||
if (this->IsBit3()) {
|
||||
this->m_duration *= this->m_loopCount;
|
||||
}
|
||||
|
||||
return this->m_duration;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user