mirror of
https://github.com/isledecomp/isle-portable.git
synced 2024-11-24 00:18:04 -05:00
Fix clang-format (#1150)
* Fix clang-format * Add back format.yml * Remove python format
This commit is contained in:
parent
71a7498481
commit
db502fcbda
2 changed files with 21 additions and 4 deletions
19
.github/workflows/format.yml
vendored
Normal file
19
.github/workflows/format.yml
vendored
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
name: Format
|
||||||
|
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
clang-format:
|
||||||
|
name: 'C++'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Run clang-format
|
||||||
|
run: |
|
||||||
|
find CONFIG LEGO1 ISLE -iname '*.h' -o -iname '*.cpp' | xargs \
|
||||||
|
pipx run "clang-format>=17,<18" \
|
||||||
|
--style=file \
|
||||||
|
-i
|
||||||
|
git diff --exit-code
|
|
@ -447,8 +447,7 @@ void LegoWorld::Add(MxCore* p_object)
|
||||||
|
|
||||||
m_entityList->Append((LegoEntity*) p_object);
|
m_entityList->Append((LegoEntity*) p_object);
|
||||||
}
|
}
|
||||||
else if (p_object->IsA("LegoLocomotionAnimPresenter") || p_object->IsA("LegoHideAnimPresenter") ||
|
else if (p_object->IsA("LegoLocomotionAnimPresenter") || p_object->IsA("LegoHideAnimPresenter") || p_object->IsA("LegoLoopingAnimPresenter")) {
|
||||||
p_object->IsA("LegoLoopingAnimPresenter")) {
|
|
||||||
MxPresenterListCursor cursor(&m_animPresenters);
|
MxPresenterListCursor cursor(&m_animPresenters);
|
||||||
|
|
||||||
if (cursor.Find((MxPresenter*) p_object)) {
|
if (cursor.Find((MxPresenter*) p_object)) {
|
||||||
|
@ -502,8 +501,7 @@ void LegoWorld::Remove(MxCore* p_object)
|
||||||
((MxControlPresenter*) p_object)->VTable0x68(TRUE);
|
((MxControlPresenter*) p_object)->VTable0x68(TRUE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (p_object->IsA("LegoLocomotionAnimPresenter") || p_object->IsA("LegoHideAnimPresenter") ||
|
else if (p_object->IsA("LegoLocomotionAnimPresenter") || p_object->IsA("LegoHideAnimPresenter") || p_object->IsA("LegoLoopingAnimPresenter")) {
|
||||||
p_object->IsA("LegoLoopingAnimPresenter")) {
|
|
||||||
MxPresenterListCursor cursor(&m_animPresenters);
|
MxPresenterListCursor cursor(&m_animPresenters);
|
||||||
|
|
||||||
if (cursor.Find((MxPresenter*) p_object)) {
|
if (cursor.Find((MxPresenter*) p_object)) {
|
||||||
|
|
Loading…
Reference in a new issue