Skip to content

Commit

Permalink
ClangFormat: Use latest version
Browse files Browse the repository at this point in the history
  • Loading branch information
btzy committed Mar 2, 2025
1 parent 29e3bcb commit 61669f2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 6 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/cmake.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,7 @@ jobs:
- name: Checkout
uses: actions/checkout@v4
- name: Format code
# ClangFormat 14 has a bug, which seems to be fixed in ClangFormat 15. Until GitHub-hosted runners support ClangFormat 15, we will stay at ClangFormat 13.
run: find src/ test/ -iname '*.c' -or -iname '*.cpp' -or -iname '*.m' -or -iname '*.mm' -or -iname '*.h' -or -iname '*.hpp' | xargs clang-format-13 -i -style=file
run: find src/ test/ -iname '*.c' -or -iname '*.cpp' -or -iname '*.m' -or -iname '*.mm' -or -iname '*.h' -or -iname '*.hpp' | xargs clang-format -i -style=file
- name: Check diff
run: git diff --exit-code

Expand Down
6 changes: 2 additions & 4 deletions src/nfd_portal.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -495,8 +495,7 @@ void AppendSaveFileQueryDictEntryFilters(DBusMessageIter& sub_iter,
if (defaultName) {
const nfdnchar_t* p = defaultName;
while (*p) ++p;
while (*--p != '.')
;
while (*--p != '.');
++p;
if (*p) extn = p;
}
Expand Down Expand Up @@ -1106,8 +1105,7 @@ bool TryGetValidExtension(const char* extn,
++extn;
if (*extn != '.') return false;
trimmed_extn = extn;
for (++extn; *extn != '\0'; ++extn)
;
for (++extn; *extn != '\0'; ++extn);
++extn;
trimmed_extn_end = extn;
return true;
Expand Down

0 comments on commit 61669f2

Please sign in to comment.