mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-26 18:04:06 +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
@@ -22,8 +22,9 @@ MxBool MxRegion::VTable0x20()
|
||||
// FUNCTION: LEGO1 0x100c3690
|
||||
MxRegion::~MxRegion()
|
||||
{
|
||||
if (m_list)
|
||||
if (m_list) {
|
||||
delete m_list;
|
||||
}
|
||||
}
|
||||
|
||||
// FUNCTION: LEGO1 0x100c3700
|
||||
@@ -88,17 +89,20 @@ void MxRegion::VTable0x18(MxRect32& p_rect)
|
||||
// FUNCTION: LEGO1 0x100c3e20
|
||||
MxBool MxRegion::VTable0x1c(MxRect32& p_rect)
|
||||
{
|
||||
if (!m_rect.IntersectsWith(p_rect))
|
||||
if (!m_rect.IntersectsWith(p_rect)) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
MxRegionTopBottomListCursor cursor(m_list);
|
||||
MxRegionTopBottom* topBottom;
|
||||
|
||||
while (cursor.Next(topBottom)) {
|
||||
if (topBottom->GetTop() >= p_rect.GetBottom())
|
||||
if (topBottom->GetTop() >= p_rect.GetBottom()) {
|
||||
return FALSE;
|
||||
if (topBottom->GetBottom() > p_rect.GetTop() && topBottom->FUN_100c57b0(p_rect))
|
||||
}
|
||||
if (topBottom->GetBottom() > p_rect.GetTop() && topBottom->FUN_100c57b0(p_rect)) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
@@ -130,27 +134,31 @@ void MxRegionTopBottom::FUN_100c5280(MxS32 p_left, MxS32 p_right)
|
||||
MxRegionLeftRightListCursor b(m_leftRightList);
|
||||
|
||||
MxRegionLeftRight* leftRight;
|
||||
while (a.Next(leftRight) && leftRight->GetRight() < p_left)
|
||||
while (a.Next(leftRight) && leftRight->GetRight() < p_left) {
|
||||
;
|
||||
}
|
||||
|
||||
if (!a.HasMatch()) {
|
||||
MxRegionLeftRight* copy = new MxRegionLeftRight(p_left, p_right);
|
||||
m_leftRightList->Append(copy);
|
||||
}
|
||||
else {
|
||||
if (p_left > leftRight->GetLeft())
|
||||
if (p_left > leftRight->GetLeft()) {
|
||||
p_left = leftRight->GetLeft();
|
||||
}
|
||||
|
||||
while (leftRight->GetLeft() < p_right) {
|
||||
if (p_right < leftRight->GetRight())
|
||||
if (p_right < leftRight->GetRight()) {
|
||||
p_right = leftRight->GetRight();
|
||||
}
|
||||
|
||||
b = a;
|
||||
b.Next();
|
||||
a.Destroy();
|
||||
|
||||
if (!b.Current(leftRight))
|
||||
if (!b.Current(leftRight)) {
|
||||
break;
|
||||
}
|
||||
|
||||
a = b;
|
||||
}
|
||||
@@ -174,8 +182,9 @@ MxRegionTopBottom* MxRegionTopBottom::Clone()
|
||||
MxRegionLeftRightListCursor cursor(m_leftRightList);
|
||||
MxRegionLeftRight* leftRight;
|
||||
|
||||
while (cursor.Next(leftRight))
|
||||
while (cursor.Next(leftRight)) {
|
||||
clone->m_leftRightList->Append(leftRight->Clone());
|
||||
}
|
||||
|
||||
return clone;
|
||||
}
|
||||
@@ -187,10 +196,12 @@ MxBool MxRegionTopBottom::FUN_100c57b0(MxRect32& p_rect)
|
||||
MxRegionLeftRight* leftRight;
|
||||
|
||||
while (cursor.Next(leftRight)) {
|
||||
if (p_rect.GetRight() <= leftRight->GetLeft())
|
||||
if (p_rect.GetRight() <= leftRight->GetLeft()) {
|
||||
return FALSE;
|
||||
if (leftRight->GetRight() > p_rect.GetLeft())
|
||||
}
|
||||
if (leftRight->GetRight() > p_rect.GetLeft()) {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
|
||||
Reference in New Issue
Block a user