Skip to content

Commit

Permalink
Better constants naming
Browse files Browse the repository at this point in the history
  • Loading branch information
tdcosta100 committed Nov 30, 2024
1 parent d77a63d commit 7919e69
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions platform/default/src/mbgl/storage/pmtiles_file_source.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@

namespace {
// https://github.com/protomaps/PMTiles/blob/main/spec/v3/spec.md#3-header
constexpr int PMTILES_HEADER_OFFSET = 0;
constexpr int PMTILES_HEADER_LENGTH = 127;
constexpr int pmtilesHeaderOffset = 0;
constexpr int pmtilesHeaderLength = 127;

// To avoid allocating lots of memory with PMTiles directory caching,
// set a limit so it doesn't grow unlimited
Expand Down Expand Up @@ -221,8 +221,8 @@ class PMTilesFileSource::Impl {
Resource resource(Resource::Kind::Source, url);
resource.loadingMethod = Resource::LoadingMethod::Network;

resource.dataRange = std::make_pair<uint64_t, uint64_t>(PMTILES_HEADER_OFFSET,
PMTILES_HEADER_OFFSET + PMTILES_HEADER_LENGTH - 1);
resource.dataRange = std::make_pair<uint64_t, uint64_t>(pmtilesHeaderOffset,
pmtilesHeaderOffset + pmtilesHeaderLength - 1);

tasks[req] = getFileSource()->request(resource, [=, this](const Response& response) {
if (response.error) {
Expand Down

0 comments on commit 7919e69

Please sign in to comment.