From 7919e69358ca64ea1ca3bd0f16cf01071578cbab Mon Sep 17 00:00:00 2001 From: Tiago Costa Date: Sat, 26 Oct 2024 03:43:33 -0300 Subject: [PATCH] Better constants naming --- platform/default/src/mbgl/storage/pmtiles_file_source.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/platform/default/src/mbgl/storage/pmtiles_file_source.cpp b/platform/default/src/mbgl/storage/pmtiles_file_source.cpp index b44b6e9dbac..9089f65ea8f 100644 --- a/platform/default/src/mbgl/storage/pmtiles_file_source.cpp +++ b/platform/default/src/mbgl/storage/pmtiles_file_source.cpp @@ -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 @@ -221,8 +221,8 @@ class PMTilesFileSource::Impl { Resource resource(Resource::Kind::Source, url); resource.loadingMethod = Resource::LoadingMethod::Network; - resource.dataRange = std::make_pair(PMTILES_HEADER_OFFSET, - PMTILES_HEADER_OFFSET + PMTILES_HEADER_LENGTH - 1); + resource.dataRange = std::make_pair(pmtilesHeaderOffset, + pmtilesHeaderOffset + pmtilesHeaderLength - 1); tasks[req] = getFileSource()->request(resource, [=, this](const Response& response) { if (response.error) {