Fix platform dependent number type unsigned long -> uint64_t
This commit is contained in:
@@ -31,7 +31,7 @@ public:
|
||||
|
||||
/* Private */
|
||||
std::vector<CanonicalTileID> tileCover(SourceType, uint16_t tileSize, const Range<uint8_t>& zoomRange) const;
|
||||
unsigned long tileCount(SourceType, uint16_t tileSize, const Range<uint8_t>& zoomRange) const;
|
||||
uint64_t tileCount(SourceType, uint16_t tileSize, const Range<uint8_t>& zoomRange) const;
|
||||
const std::string styleURL;
|
||||
const LatLngBounds bounds;
|
||||
const double minZoom;
|
||||
|
||||
@@ -38,7 +38,7 @@ std::vector<CanonicalTileID> OfflineTilePyramidRegionDefinition::tileCover(Sourc
|
||||
return result;
|
||||
}
|
||||
|
||||
unsigned long OfflineTilePyramidRegionDefinition::tileCount(SourceType type, uint16_t tileSize, const Range<uint8_t>& zoomRange) const {
|
||||
uint64_t OfflineTilePyramidRegionDefinition::tileCount(SourceType type, uint16_t tileSize, const Range<uint8_t>& zoomRange) const {
|
||||
|
||||
const Range<uint8_t> clampedZoomRange = coveringZoomRange(type, tileSize, zoomRange);
|
||||
unsigned long result = 0;;
|
||||
|
||||
@@ -170,9 +170,9 @@ std::vector<UnwrappedTileID> tileCover(const TransformState& state, int32_t z) {
|
||||
}
|
||||
|
||||
// Taken from https://github.com/mapbox/sphericalmercator#xyzbbox-zoom-tms_style-srs
|
||||
// Computes the projected tiles for the lower left and uppoer right points of the bounds
|
||||
// Computes the projected tiles for the lower left and upper right points of the bounds
|
||||
// and uses that to compute the tile cover count
|
||||
unsigned long tileCount(const LatLngBounds& bounds, uint8_t zoom, uint16_t tileSize_){
|
||||
uint64_t tileCount(const LatLngBounds& bounds, uint8_t zoom, uint16_t tileSize_){
|
||||
|
||||
auto sw = Projection::project(bounds.southwest().wrapped(), zoom, tileSize_);
|
||||
auto ne = Projection::project(bounds.northeast().wrapped(), zoom, tileSize_);
|
||||
|
||||
@@ -19,7 +19,7 @@ std::vector<UnwrappedTileID> tileCover(const TransformState&, int32_t z);
|
||||
std::vector<UnwrappedTileID> tileCover(const LatLngBounds&, int32_t z);
|
||||
|
||||
// Compute only the count of tiles needed for tileCover
|
||||
unsigned long tileCount(const LatLngBounds&, uint8_t z, uint16_t tileSize);
|
||||
uint64_t tileCount(const LatLngBounds&, uint8_t z, uint16_t tileSize);
|
||||
|
||||
} // namespace util
|
||||
} // namespace mbgl
|
||||
|
||||
Reference in New Issue
Block a user