Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] authored and tdcosta100 committed Nov 30, 2024
1 parent 7482a1b commit d77a63d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
6 changes: 3 additions & 3 deletions platform/default/src/mbgl/storage/pmtiles_file_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,14 @@ class PMTilesFileSource::Impl {

if (response.error->message.empty() && response.error->reason == Response::Error::Reason::NotFound) {
if (url.starts_with(mbgl::util::FILE_PROTOCOL)) {
message += "path not found: " + url.substr(std::char_traits<char>::length(mbgl::util::FILE_PROTOCOL));
message += "path not found: " +
url.substr(std::char_traits<char>::length(mbgl::util::FILE_PROTOCOL));
} else {
message += "url not found: " + url;
}
}

callback(std::make_unique<Response::Error>(
response.error->reason, message));
callback(std::make_unique<Response::Error>(response.error->reason, message));

return;
}
Expand Down
6 changes: 2 additions & 4 deletions test/storage/pmtiles_file_source.test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,7 @@ TEST(PMTilesFileSource, Tile) {
PMTilesFileSource pmtiles(ResourceOptions::Default(), ClientOptions());

std::unique_ptr<AsyncRequest> req = pmtiles.request(
Resource::tile(
toAbsoluteURL("geography-class-png.pmtiles"), 1.0, 0, 0, 0, Tileset::Scheme::XYZ),
Resource::tile(toAbsoluteURL("geography-class-png.pmtiles"), 1.0, 0, 0, 0, Tileset::Scheme::XYZ),
[&](Response res) {
req.reset();
EXPECT_EQ(nullptr, res.error);
Expand All @@ -93,8 +92,7 @@ TEST(PMTilesFileSource, NonExistentTile) {
PMTilesFileSource pmtiles(ResourceOptions::Default(), ClientOptions());

std::unique_ptr<AsyncRequest> req = pmtiles.request(
Resource::tile(
toAbsoluteURL("geography-class-png.pmtiles"), 1.0, 0, 0, 4, Tileset::Scheme::XYZ),
Resource::tile(toAbsoluteURL("geography-class-png.pmtiles"), 1.0, 0, 0, 4, Tileset::Scheme::XYZ),
[&](Response res) {
req.reset();
EXPECT_EQ(nullptr, res.error);
Expand Down

0 comments on commit d77a63d

Please sign in to comment.