Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#2815)
Browse files Browse the repository at this point in the history
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
  • Loading branch information
pre-commit-ci[bot] authored Oct 1, 2024
1 parent 7819c18 commit b4c8b12
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 12 deletions.
6 changes: 3 additions & 3 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ repos:
- id: check-yaml
args: [--allow-multiple-documents]
- repo: https://github.com/pre-commit/mirrors-clang-format
rev: v18.1.8
rev: v19.1.0
hooks:
- id: clang-format
files: '.*\.(hpp|cpp|h)'
Expand All @@ -15,12 +15,12 @@ repos:
hooks:
- id: buildifier
- repo: https://github.com/Mateusz-Grzelinski/actionlint-py
rev: v1.7.1.15
rev: v1.7.2.16
hooks:
- id: actionlint
additional_dependencies: [shellcheck-py]
- repo: https://github.com/nicklockwood/SwiftFormat
rev: "0.54.3"
rev: "0.54.5"
hooks:
- id: swiftformat
args: [--swiftversion, "5.8"]
Expand Down
3 changes: 2 additions & 1 deletion src/mbgl/layout/symbol_instance.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,8 @@ struct source_location {
#endif
#else
#define SYM_GUARD_LOC \
{}
{ \
}
#endif

namespace mbgl {
Expand Down
5 changes: 3 additions & 2 deletions src/mbgl/style/conversion/constant.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,9 @@ std::optional<T> Converter<T, typename std::enable_if_t<std::is_enum_v<T>>>::ope
}

template <class T>
auto Converter<std::vector<T>, typename std::enable_if_t<std::is_enum_v<T>>>::operator()(
const Convertible& value, Error& error) const -> std::optional<std::vector<T>> {
auto Converter<std::vector<T>, typename std::enable_if_t<std::is_enum_v<T>>>::operator()(const Convertible& value,
Error& error) const
-> std::optional<std::vector<T>> {
if (!isArray(value)) {
error.message = "value must be an array";
return std::nullopt;
Expand Down
4 changes: 3 additions & 1 deletion test/actor/actor.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,9 @@ TEST(Actor, Destruction) {
};

bool destructed = false;
{ Actor<TestActor> test(Scheduler::GetBackground(), std::ref(destructed)); }
{
Actor<TestActor> test(Scheduler::GetBackground(), std::ref(destructed));
}

EXPECT_TRUE(destructed);
}
Expand Down
4 changes: 3 additions & 1 deletion test/renderer/backend_scope.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,9 @@ TEST(BackendScope, SingleScope) {
deactivated = true;
};

{ gfx::BackendScope test{backend}; }
{
gfx::BackendScope test{backend};
}

ASSERT_TRUE(activated);
ASSERT_TRUE(deactivated);
Expand Down
16 changes: 12 additions & 4 deletions test/storage/offline_database.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,9 @@ TEST(OfflineDatabase, TEST_REQUIRES_WRITE(SchemaVersion)) {
db.exec("PRAGMA user_version = 1");
}

{ OfflineDatabase db(filename, fixture::tileServerOptions); }
{
OfflineDatabase db(filename, fixture::tileServerOptions);
}

EXPECT_EQ(6, databaseUserVersion(filename));

Expand Down Expand Up @@ -567,7 +569,9 @@ TEST(OfflineDatabase, TEST_REQUIRES_WRITE(DISABLED_MaximumAmbientCacheSize)) {
return util::read_file(filename).size();
};

{ OfflineDatabase db(filename, fixture::tileServerOptions); }
{
OfflineDatabase db(filename, fixture::tileServerOptions);
}

size_t initialSize = util::read_file(filename).size();
size_t maximumSize = 50 * 1024 * 1024;
Expand Down Expand Up @@ -716,7 +720,9 @@ TEST(OfflineDatabase, TEST_REQUIRES_WRITE(DeleteRegion)) {
FixtureLog log;
deleteDatabaseFiles();

{ OfflineDatabase dbCreate(filename, fixture::tileServerOptions); }
{
OfflineDatabase dbCreate(filename, fixture::tileServerOptions);
}

#ifndef __QT__ // Qt doesn't decrease the size of the database file.
size_t initialSize = util::read_file(filename).size();
Expand Down Expand Up @@ -1015,7 +1021,9 @@ TEST(OfflineDatabase, TEST_REQUIRES_WRITE(ClearAmbientCache)) {
FixtureLog log;
deleteDatabaseFiles();

{ OfflineDatabase dbCreate(filename, fixture::tileServerOptions); }
{
OfflineDatabase dbCreate(filename, fixture::tileServerOptions);
}

#ifndef __QT__ // Qt doesn't decrease the size of the database file.
size_t initialSize = util::read_file(filename).size();
Expand Down

0 comments on commit b4c8b12

Please sign in to comment.