summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-27 18:30:35 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2020-04-17 13:36:50 +0300
commitdffe00feeade4d65d10deecdc196add14b791c11 (patch)
treec0b834bf8e6f44e37b5d01af87c044bdf91c7079
parent2eebd7170aa72168df1d963422d256411fc4f5ef (diff)
downloadqtlocation-mapboxgl-dffe00feeade4d65d10deecdc196add14b791c11.tar.gz
[core] Fix readability-avoid-const-params-in-decls errors in header files
As reported by clang-tidy-8.
-rw-r--r--include/mbgl/storage/database_file_source.hpp2
-rw-r--r--include/mbgl/style/expression/get_covering_stops.hpp3
-rw-r--r--include/mbgl/style/expression/step.hpp2
-rw-r--r--include/mbgl/style/expression/value.hpp2
-rw-r--r--include/mbgl/style/property_expression.hpp4
-rw-r--r--include/mbgl/style/sources/geojson_source.hpp6
-rw-r--r--include/mbgl/style/sources/image_source.hpp2
-rw-r--r--include/mbgl/util/chrono.hpp2
-rw-r--r--include/mbgl/util/geo.hpp2
-rw-r--r--platform/default/include/mbgl/storage/offline_database.hpp3
-rw-r--r--src/mbgl/annotation/annotation_tile.hpp4
-rw-r--r--src/mbgl/annotation/shape_annotation_impl.hpp2
-rw-r--r--src/mbgl/geometry/dem_data.hpp2
-rw-r--r--src/mbgl/geometry/feature_index.hpp37
-rw-r--r--src/mbgl/gfx/upload_pass.hpp10
-rw-r--r--src/mbgl/gl/enum.hpp2
-rw-r--r--src/mbgl/gl/upload_pass.hpp16
-rw-r--r--src/mbgl/layout/clip_lines.hpp4
-rw-r--r--src/mbgl/layout/layout.hpp4
-rw-r--r--src/mbgl/layout/symbol_instance.hpp24
-rw-r--r--src/mbgl/layout/symbol_layout.hpp14
-rw-r--r--src/mbgl/layout/symbol_projection.hpp36
-rw-r--r--src/mbgl/map/transform_state.hpp6
-rw-r--r--src/mbgl/programs/fill_extrusion_program.hpp12
-rw-r--r--src/mbgl/programs/fill_program.hpp2
-rw-r--r--src/mbgl/programs/line_program.hpp37
-rw-r--r--src/mbgl/programs/symbol_program.hpp34
-rw-r--r--src/mbgl/renderer/buckets/circle_bucket.hpp4
-rw-r--r--src/mbgl/renderer/buckets/fill_bucket.hpp4
-rw-r--r--src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp4
-rw-r--r--src/mbgl/renderer/buckets/line_bucket.hpp4
-rw-r--r--src/mbgl/renderer/buckets/symbol_bucket.hpp7
-rw-r--r--src/mbgl/renderer/layers/render_circle_layer.hpp9
-rw-r--r--src/mbgl/renderer/layers/render_fill_extrusion_layer.hpp9
-rw-r--r--src/mbgl/renderer/layers/render_fill_layer.hpp9
-rw-r--r--src/mbgl/renderer/layers/render_heatmap_layer.hpp9
-rw-r--r--src/mbgl/renderer/layers/render_line_layer.hpp11
-rw-r--r--src/mbgl/renderer/render_tile.hpp2
-rw-r--r--src/mbgl/text/check_max_angle.hpp7
-rw-r--r--src/mbgl/text/collision_feature.hpp24
-rw-r--r--src/mbgl/text/collision_index.hpp34
-rw-r--r--src/mbgl/text/get_anchors.hpp31
-rw-r--r--src/mbgl/text/placement.hpp6
-rw-r--r--src/mbgl/text/quads.hpp2
-rw-r--r--src/mbgl/text/shaping.hpp6
-rw-r--r--src/mbgl/tile/geometry_tile.hpp2
-rw-r--r--src/mbgl/tile/geometry_tile_worker.hpp6
-rw-r--r--src/mbgl/tile/raster_dem_tile.hpp4
-rw-r--r--src/mbgl/util/grid_index.hpp9
49 files changed, 260 insertions, 217 deletions
diff --git a/include/mbgl/storage/database_file_source.hpp b/include/mbgl/storage/database_file_source.hpp
index 1578ba8418..8a47914629 100644
--- a/include/mbgl/storage/database_file_source.hpp
+++ b/include/mbgl/storage/database_file_source.hpp
@@ -152,7 +152,7 @@ public:
/*
* Update an offline region metadata in the database.
*/
- virtual void updateOfflineMetadata(const int64_t regionID,
+ virtual void updateOfflineMetadata(int64_t regionID,
const OfflineRegionMetadata& metadata,
std::function<void(expected<OfflineRegionMetadata, std::exception_ptr>)>);
diff --git a/include/mbgl/style/expression/get_covering_stops.hpp b/include/mbgl/style/expression/get_covering_stops.hpp
index 157aefe7bc..c9de9d1965 100644
--- a/include/mbgl/style/expression/get_covering_stops.hpp
+++ b/include/mbgl/style/expression/get_covering_stops.hpp
@@ -10,8 +10,7 @@ namespace style {
namespace expression {
// Return the smallest range of stops that covers the interval [lower, upper]
-Range<float> getCoveringStops(const std::map<double, std::unique_ptr<Expression>>& stops,
- const double lower, const double upper);
+Range<float> getCoveringStops(const std::map<double, std::unique_ptr<Expression>>& stops, double lower, double upper);
} // namespace expression
} // namespace style
diff --git a/include/mbgl/style/expression/step.hpp b/include/mbgl/style/expression/step.hpp
index 24e29b1a4e..f241f7af67 100644
--- a/include/mbgl/style/expression/step.hpp
+++ b/include/mbgl/style/expression/step.hpp
@@ -24,7 +24,7 @@ public:
void eachStop(const std::function<void(double, const Expression&)>& visit) const;
const std::unique_ptr<Expression>& getInput() const { return input; }
- Range<float> getCoveringStops(const double lower, const double upper) const;
+ Range<float> getCoveringStops(double lower, double upper) const;
bool operator==(const Expression& e) const override;
diff --git a/include/mbgl/style/expression/value.hpp b/include/mbgl/style/expression/value.hpp
index 6f12bb9336..80e6b65233 100644
--- a/include/mbgl/style/expression/value.hpp
+++ b/include/mbgl/style/expression/value.hpp
@@ -93,7 +93,7 @@ struct ValueConverter<mbgl::Value> {
template <>
struct ValueConverter<float> {
static type::Type expressionType() { return type::Number; }
- static Value toExpressionValue(const float value);
+ static Value toExpressionValue(float value);
static optional<float> fromExpressionValue(const Value& value);
};
diff --git a/include/mbgl/style/property_expression.hpp b/include/mbgl/style/property_expression.hpp
index 8502bfefbd..95f3cbab2d 100644
--- a/include/mbgl/style/property_expression.hpp
+++ b/include/mbgl/style/property_expression.hpp
@@ -17,8 +17,8 @@ public:
bool isZoomConstant() const noexcept;
bool isFeatureConstant() const noexcept;
bool isRuntimeConstant() const noexcept;
- float interpolationFactor(const Range<float>&, const float) const noexcept;
- Range<float> getCoveringStops(const float, const float) const noexcept;
+ float interpolationFactor(const Range<float>&, float) const noexcept;
+ Range<float> getCoveringStops(float, float) const noexcept;
const expression::Expression& getExpression() const noexcept;
// Can be used for aggregating property expressions from multiple
diff --git a/include/mbgl/style/sources/geojson_source.hpp b/include/mbgl/style/sources/geojson_source.hpp
index 9cfcade0ed..f08f897bea 100644
--- a/include/mbgl/style/sources/geojson_source.hpp
+++ b/include/mbgl/style/sources/geojson_source.hpp
@@ -49,10 +49,8 @@ public:
virtual void getTile(const CanonicalTileID&, const std::function<void(TileFeatures)>&) = 0;
// SuperclusterData
- virtual Features getChildren(const std::uint32_t) = 0;
- virtual Features getLeaves(const std::uint32_t,
- const std::uint32_t limit = 10u,
- const std::uint32_t offset = 0u) = 0;
+ virtual Features getChildren(std::uint32_t) = 0;
+ virtual Features getLeaves(std::uint32_t, std::uint32_t limit = 10u, std::uint32_t offset = 0u) = 0;
virtual std::uint8_t getClusterExpansionZoom(std::uint32_t) = 0;
virtual std::shared_ptr<Scheduler> getScheduler() { return nullptr; }
diff --git a/include/mbgl/style/sources/image_source.hpp b/include/mbgl/style/sources/image_source.hpp
index d2b7c37bdf..32971ef3d6 100644
--- a/include/mbgl/style/sources/image_source.hpp
+++ b/include/mbgl/style/sources/image_source.hpp
@@ -12,7 +12,7 @@ namespace style {
class ImageSource final : public Source {
public:
- ImageSource(std::string id, const std::array<LatLng, 4>);
+ ImageSource(std::string id, std::array<LatLng, 4>);
~ImageSource() override;
optional<std::string> getURL() const;
diff --git a/include/mbgl/util/chrono.hpp b/include/mbgl/util/chrono.hpp
index 723cd131e3..4de3c2d3a2 100644
--- a/include/mbgl/util/chrono.hpp
+++ b/include/mbgl/util/chrono.hpp
@@ -30,7 +30,7 @@ std::string iso8601(Timestamp);
Timestamp parseTimestamp(const char *);
-Timestamp parseTimestamp(const int32_t timestamp);
+Timestamp parseTimestamp(int32_t timestamp);
// C++17 polyfill
template <class Rep, class Period, class = std::enable_if_t<
diff --git a/include/mbgl/util/geo.hpp b/include/mbgl/util/geo.hpp
index 9e1ecfff91..58e5c834ab 100644
--- a/include/mbgl/util/geo.hpp
+++ b/include/mbgl/util/geo.hpp
@@ -161,7 +161,7 @@ public:
bool contains(const LatLng& point, LatLng::WrapMode wrap = LatLng::Unwrapped) const;
bool contains(const LatLngBounds& area, LatLng::WrapMode wrap = LatLng::Unwrapped) const;
- bool intersects(const LatLngBounds area, LatLng::WrapMode wrap = LatLng::Unwrapped) const;
+ bool intersects(LatLngBounds area, LatLng::WrapMode wrap = LatLng::Unwrapped) const;
private:
LatLng sw;
diff --git a/platform/default/include/mbgl/storage/offline_database.hpp b/platform/default/include/mbgl/storage/offline_database.hpp
index 7eb546b3f6..af889bb05c 100644
--- a/platform/default/include/mbgl/storage/offline_database.hpp
+++ b/platform/default/include/mbgl/storage/offline_database.hpp
@@ -68,8 +68,7 @@ public:
expected<OfflineRegions, std::exception_ptr>
mergeDatabase(const std::string& sideDatabasePath);
- expected<OfflineRegionMetadata, std::exception_ptr>
- updateMetadata(const int64_t regionID, const OfflineRegionMetadata&);
+ expected<OfflineRegionMetadata, std::exception_ptr> updateMetadata(int64_t regionID, const OfflineRegionMetadata&);
std::exception_ptr deleteRegion(OfflineRegion&&);
std::exception_ptr invalidateRegion(int64_t regionID);
diff --git a/src/mbgl/annotation/annotation_tile.hpp b/src/mbgl/annotation/annotation_tile.hpp
index da5fc28cb6..92ddf09f68 100644
--- a/src/mbgl/annotation/annotation_tile.hpp
+++ b/src/mbgl/annotation/annotation_tile.hpp
@@ -44,10 +44,10 @@ public:
std::unique_ptr<GeometryTileFeature> getFeature(std::size_t i) const override;
std::string getName() const override;
- void addFeature(const AnnotationID,
+ void addFeature(AnnotationID,
FeatureType,
GeometryCollection,
- std::unordered_map<std::string, std::string> properties = { {} });
+ std::unordered_map<std::string, std::string> properties = {{}});
private:
std::shared_ptr<AnnotationTileLayerData> layer;
diff --git a/src/mbgl/annotation/shape_annotation_impl.hpp b/src/mbgl/annotation/shape_annotation_impl.hpp
index 3e28221f7b..64007d4fa1 100644
--- a/src/mbgl/annotation/shape_annotation_impl.hpp
+++ b/src/mbgl/annotation/shape_annotation_impl.hpp
@@ -17,7 +17,7 @@ class CanonicalTileID;
class ShapeAnnotationImpl {
public:
- ShapeAnnotationImpl(const AnnotationID);
+ ShapeAnnotationImpl(AnnotationID);
virtual ~ShapeAnnotationImpl() = default;
virtual void updateStyle(style::Style::Impl&) const = 0;
diff --git a/src/mbgl/geometry/dem_data.hpp b/src/mbgl/geometry/dem_data.hpp
index 537575873f..5044fb0658 100644
--- a/src/mbgl/geometry/dem_data.hpp
+++ b/src/mbgl/geometry/dem_data.hpp
@@ -16,7 +16,7 @@ public:
DEMData(const PremultipliedImage& image, Tileset::DEMEncoding encoding);
void backfillBorder(const DEMData& borderTileData, int8_t dx, int8_t dy);
- int32_t get(const int32_t x, const int32_t y) const;
+ int32_t get(int32_t x, int32_t y) const;
const std::array<float, 4>& getUnpackVector() const;
const PremultipliedImage* getImage() const {
diff --git a/src/mbgl/geometry/feature_index.hpp b/src/mbgl/geometry/feature_index.hpp
index 7bfbe33391..24f36d98a0 100644
--- a/src/mbgl/geometry/feature_index.hpp
+++ b/src/mbgl/geometry/feature_index.hpp
@@ -61,18 +61,23 @@ public:
void insert(const GeometryCollection&, std::size_t index, const std::string& sourceLayerName, const std::string& bucketLeaderID);
- void query(std::unordered_map<std::string, std::vector<Feature>>& result, const GeometryCoordinates& queryGeometry,
- const TransformState&, const mat4& posMatrix, const double tileSize, const double scale,
- const RenderedQueryOptions& options, const UnwrappedTileID&,
- const std::unordered_map<std::string, const RenderLayer*>&, const float additionalQueryPadding,
+ void query(std::unordered_map<std::string, std::vector<Feature>>& result,
+ const GeometryCoordinates& queryGeometry,
+ const TransformState&,
+ const mat4& posMatrix,
+ double tileSize,
+ double scale,
+ const RenderedQueryOptions& options,
+ const UnwrappedTileID&,
+ const std::unordered_map<std::string, const RenderLayer*>&,
+ float additionalQueryPadding,
const SourceFeatureState& sourceFeatureState) const;
- static optional<GeometryCoordinates> translateQueryGeometry(
- const GeometryCoordinates& queryGeometry,
- const std::array<float, 2>& translate,
- const style::TranslateAnchorType,
- const float bearing,
- const float pixelsToTileUnits);
+ static optional<GeometryCoordinates> translateQueryGeometry(const GeometryCoordinates& queryGeometry,
+ const std::array<float, 2>& translate,
+ style::TranslateAnchorType,
+ float bearing,
+ float pixelsToTileUnits);
void setBucketLayerIDs(const std::string& bucketLeaderID, const std::vector<std::string>& layerIDs);
@@ -84,11 +89,15 @@ public:
const FeatureSortOrder& featureSortOrder) const;
private:
- void addFeature(std::unordered_map<std::string, std::vector<Feature>>& result, const IndexedSubfeature&,
- const RenderedQueryOptions& options, const CanonicalTileID&,
+ void addFeature(std::unordered_map<std::string, std::vector<Feature>>& result,
+ const IndexedSubfeature&,
+ const RenderedQueryOptions& options,
+ const CanonicalTileID&,
const std::unordered_map<std::string, const RenderLayer*>&,
- const GeometryCoordinates& queryGeometry, const TransformState& transformState,
- const float pixelsToTileUnits, const mat4& posMatrix,
+ const GeometryCoordinates& queryGeometry,
+ const TransformState& transformState,
+ float pixelsToTileUnits,
+ const mat4& posMatrix,
const SourceFeatureState* sourceFeatureState) const;
GridIndex<IndexedSubfeature> grid;
diff --git a/src/mbgl/gfx/upload_pass.hpp b/src/mbgl/gfx/upload_pass.hpp
index f0bf9d7e2d..4324cb5773 100644
--- a/src/mbgl/gfx/upload_pass.hpp
+++ b/src/mbgl/gfx/upload_pass.hpp
@@ -55,13 +55,15 @@ public:
}
protected:
- virtual std::unique_ptr<VertexBufferResource>
- createVertexBufferResource(const void* data, std::size_t size, const BufferUsageType) = 0;
+ virtual std::unique_ptr<VertexBufferResource> createVertexBufferResource(const void* data,
+ std::size_t size,
+ BufferUsageType) = 0;
virtual void
updateVertexBufferResource(VertexBufferResource&, const void* data, std::size_t size) = 0;
- virtual std::unique_ptr<IndexBufferResource>
- createIndexBufferResource(const void* data, std::size_t size, const BufferUsageType) = 0;
+ virtual std::unique_ptr<IndexBufferResource> createIndexBufferResource(const void* data,
+ std::size_t size,
+ BufferUsageType) = 0;
virtual void
updateIndexBufferResource(IndexBufferResource&, const void* data, std::size_t size) = 0;
diff --git a/src/mbgl/gl/enum.hpp b/src/mbgl/gl/enum.hpp
index 6aa29efdb1..9780be55af 100644
--- a/src/mbgl/gl/enum.hpp
+++ b/src/mbgl/gl/enum.hpp
@@ -13,7 +13,7 @@ public:
using InType = std::conditional_t<std::is_same<std::underlying_type_t<T>, bool>::value, platform::GLboolean, platform::GLint>;
using OutType = std::conditional_t<std::is_same<std::underlying_type_t<T>, bool>::value, platform::GLboolean, platform::GLenum>;
- static T from(const InType);
+ static T from(InType);
static OutType to(T);
};
diff --git a/src/mbgl/gl/upload_pass.hpp b/src/mbgl/gl/upload_pass.hpp
index 8b4f71b88d..692652a823 100644
--- a/src/mbgl/gl/upload_pass.hpp
+++ b/src/mbgl/gl/upload_pass.hpp
@@ -23,15 +23,25 @@ private:
void popDebugGroup() override;
public:
- std::unique_ptr<gfx::VertexBufferResource> createVertexBufferResource(const void* data, std::size_t size, const gfx::BufferUsageType) override;
+ std::unique_ptr<gfx::VertexBufferResource> createVertexBufferResource(const void* data,
+ std::size_t size,
+ gfx::BufferUsageType) override;
void updateVertexBufferResource(gfx::VertexBufferResource&, const void* data, std::size_t size) override;
- std::unique_ptr<gfx::IndexBufferResource> createIndexBufferResource(const void* data, std::size_t size, const gfx::BufferUsageType) override;
+ std::unique_ptr<gfx::IndexBufferResource> createIndexBufferResource(const void* data,
+ std::size_t size,
+ gfx::BufferUsageType) override;
void updateIndexBufferResource(gfx::IndexBufferResource&, const void* data, std::size_t size) override;
public:
std::unique_ptr<gfx::TextureResource> createTextureResource(Size, const void* data, gfx::TexturePixelType, gfx::TextureChannelDataType) override;
void updateTextureResource(gfx::TextureResource&, Size, const void* data, gfx::TexturePixelType, gfx::TextureChannelDataType) override;
- void updateTextureResourceSub(gfx::TextureResource&, const uint16_t xOffset, const uint16_t yOffset, Size, const void* data, gfx::TexturePixelType, gfx::TextureChannelDataType) override;
+ void updateTextureResourceSub(gfx::TextureResource&,
+ uint16_t xOffset,
+ uint16_t yOffset,
+ Size,
+ const void* data,
+ gfx::TexturePixelType,
+ gfx::TextureChannelDataType) override;
private:
gl::CommandEncoder& commandEncoder;
diff --git a/src/mbgl/layout/clip_lines.hpp b/src/mbgl/layout/clip_lines.hpp
index c1cfd4bbb9..9c6ebbddfd 100644
--- a/src/mbgl/layout/clip_lines.hpp
+++ b/src/mbgl/layout/clip_lines.hpp
@@ -8,9 +8,7 @@
namespace mbgl {
namespace util {
-
-GeometryCollection clipLines(const GeometryCollection &lines,
- const int16_t x1, const int16_t y1, const int16_t x2, const int16_t y2);
+GeometryCollection clipLines(const GeometryCollection &lines, int16_t x1, int16_t y1, int16_t x2, int16_t y2);
} // end namespace util
} // end namespace mbgl
diff --git a/src/mbgl/layout/layout.hpp b/src/mbgl/layout/layout.hpp
index ae0eb5d5f3..aaa4d4b8e1 100644
--- a/src/mbgl/layout/layout.hpp
+++ b/src/mbgl/layout/layout.hpp
@@ -20,8 +20,8 @@ public:
virtual void createBucket(const ImagePositions&,
std::unique_ptr<FeatureIndex>&,
std::unordered_map<std::string, LayerRenderData>&,
- const bool,
- const bool,
+ bool,
+ bool,
const CanonicalTileID&) = 0;
virtual void prepareSymbols(const GlyphMap&, const GlyphPositions&, const ImageMap&, const ImagePositions&){};
diff --git a/src/mbgl/layout/symbol_instance.hpp b/src/mbgl/layout/symbol_instance.hpp
index fa05affc13..b10a3acaee 100644
--- a/src/mbgl/layout/symbol_instance.hpp
+++ b/src/mbgl/layout/symbol_instance.hpp
@@ -29,7 +29,7 @@ struct SymbolInstanceSharedData {
const optional<PositionedIcon>& shapedIcon,
const optional<PositionedIcon>& verticallyShapedIcon,
const style::SymbolLayoutProperties::Evaluated& layout,
- const style::SymbolPlacementType textPlacement,
+ style::SymbolPlacementType textPlacement,
const std::array<float, 2>& textOffset,
const ImageMap& imageMap,
float iconRotation,
@@ -54,23 +54,23 @@ public:
const ShapedTextOrientations& shapedTextOrientations,
const optional<PositionedIcon>& shapedIcon,
const optional<PositionedIcon>& verticallyShapedIcon,
- const float textBoxScale,
- const float textPadding,
- const style::SymbolPlacementType textPlacement,
+ float textBoxScale,
+ float textPadding,
+ style::SymbolPlacementType textPlacement,
const std::array<float, 2>& textOffset,
- const float iconBoxScale,
- const float iconPadding,
+ float iconBoxScale,
+ float iconPadding,
const std::array<float, 2>& iconOffset,
const IndexedSubfeature& indexedFeature,
- const std::size_t layoutFeatureIndex,
- const std::size_t dataFeatureIndex,
+ std::size_t layoutFeatureIndex,
+ std::size_t dataFeatureIndex,
std::u16string key,
- const float overscaling,
- const float iconRotation,
- const float textRotation,
+ float overscaling,
+ float iconRotation,
+ float textRotation,
const std::array<float, 2>& variableTextOffset,
bool allowVerticalPlacement,
- const SymbolContent iconType = SymbolContent::None);
+ SymbolContent iconType = SymbolContent::None);
optional<size_t> getDefaultHorizontalPlacedTextIndex() const;
const GeometryCoordinates& line() const;
diff --git a/src/mbgl/layout/symbol_layout.hpp b/src/mbgl/layout/symbol_layout.hpp
index a1c0b86fd9..915a2ae924 100644
--- a/src/mbgl/layout/symbol_layout.hpp
+++ b/src/mbgl/layout/symbol_layout.hpp
@@ -39,8 +39,8 @@ public:
void createBucket(const ImagePositions&,
std::unique_ptr<FeatureIndex>&,
std::unordered_map<std::string, LayerRenderData>&,
- const bool firstLoad,
- const bool showCollisionBoxes,
+ bool firstLoad,
+ bool showCollisionBoxes,
const CanonicalTileID& canonical) override;
bool hasSymbolInstances() const override;
@@ -65,7 +65,7 @@ public:
static std::vector<float> calculateTileDistances(const GeometryCoordinates& line, const Anchor& anchor);
private:
- void addFeature(const size_t,
+ void addFeature(size_t,
const SymbolFeature&,
const ShapedTextOrientations& shapedTextOrientations,
optional<PositionedIcon> shapedIcon,
@@ -73,22 +73,22 @@ private:
std::array<float, 2> textOffset,
float layoutTextSize,
float layoutIconSize,
- const SymbolContent iconType);
+ SymbolContent iconType);
- bool anchorIsTooClose(const std::u16string& text, const float repeatDistance, const Anchor&);
+ bool anchorIsTooClose(const std::u16string& text, float repeatDistance, const Anchor&);
std::map<std::u16string, std::vector<Anchor>> compareText;
void addToDebugBuffers(SymbolBucket&);
// Adds placed items to the buffer.
size_t addSymbol(SymbolBucket::Buffer&,
- const Range<float> sizeData,
+ Range<float> sizeData,
const SymbolQuad&,
const Anchor& labelAnchor,
PlacedSymbol& placedSymbol,
float sortKey);
size_t addSymbols(SymbolBucket::Buffer&,
- const Range<float> sizeData,
+ Range<float> sizeData,
const SymbolQuads&,
const Anchor& labelAnchor,
PlacedSymbol& placedSymbol,
diff --git a/src/mbgl/layout/symbol_projection.hpp b/src/mbgl/layout/symbol_projection.hpp
index d9c80df418..e04f8908b6 100644
--- a/src/mbgl/layout/symbol_projection.hpp
+++ b/src/mbgl/layout/symbol_projection.hpp
@@ -38,30 +38,38 @@ namespace mbgl {
};
float evaluateSizeForFeature(const ZoomEvaluatedSize& zoomEvaluatedSize, const PlacedSymbol& placedSymbol);
- mat4 getLabelPlaneMatrix(const mat4& posMatrix, const bool pitchWithMap, const bool rotateWithMap, const TransformState& state, const float pixelsToTileUnits);
- mat4 getGlCoordMatrix(const mat4& posMatrix, const bool pitchWithMap, const bool rotateWithMap, const TransformState& state, const float pixelsToTileUnits);
-
+ mat4 getLabelPlaneMatrix(const mat4& posMatrix,
+ bool pitchWithMap,
+ bool rotateWithMap,
+ const TransformState& state,
+ float pixelsToTileUnits);
+ mat4 getGlCoordMatrix(const mat4& posMatrix,
+ bool pitchWithMap,
+ bool rotateWithMap,
+ const TransformState& state,
+ float pixelsToTileUnits);
+
using PointAndCameraDistance = std::pair<Point<float>,float>;
PointAndCameraDistance project(const Point<float>& point, const mat4& matrix);
void reprojectLineLabels(gfx::VertexVector<gfx::Vertex<SymbolDynamicLayoutAttributes>>&, const std::vector<PlacedSymbol>&,
const mat4& posMatrix, bool pitchWithMap, bool rotateWithMap, bool keepUpright,
const RenderTile&, const SymbolSizeBinder& sizeBinder, const TransformState&);
-
- optional<std::pair<PlacedGlyph, PlacedGlyph>> placeFirstAndLastGlyph(const float fontScale,
- const float lineOffsetX,
- const float lineOffsetY,
- const bool flip,
- const Point<float>& anchorPoint,
- const Point<float>& tileAnchorPoint,
- const PlacedSymbol& symbol,
- const mat4& labelPlaneMatrix,
- const bool returnTileDistance);
+
+ optional<std::pair<PlacedGlyph, PlacedGlyph>> placeFirstAndLastGlyph(float fontScale,
+ float lineOffsetX,
+ float lineOffsetY,
+ bool flip,
+ const Point<float>& anchorPoint,
+ const Point<float>& tileAnchorPoint,
+ const PlacedSymbol& symbol,
+ const mat4& labelPlaneMatrix,
+ bool returnTileDistance);
void hideGlyphs(std::size_t numGlyphs,
gfx::VertexVector<gfx::Vertex<SymbolDynamicLayoutAttributes>>& dynamicVertexArray);
void addDynamicAttributes(const Point<float>& anchorPoint,
- const float angle,
+ float angle,
gfx::VertexVector<gfx::Vertex<SymbolDynamicLayoutAttributes>>& dynamicVertexArray);
} // end namespace mbgl
diff --git a/src/mbgl/map/transform_state.hpp b/src/mbgl/map/transform_state.hpp
index 69f0eebd40..32d5ef772f 100644
--- a/src/mbgl/map/transform_state.hpp
+++ b/src/mbgl/map/transform_state.hpp
@@ -120,11 +120,11 @@ public:
// North Orientation
NorthOrientation getNorthOrientation() const;
double getNorthOrientationAngle() const;
- void setNorthOrientation(const NorthOrientation);
+ void setNorthOrientation(NorthOrientation);
// Constrain mode
ConstrainMode getConstrainMode() const;
- void setConstrainMode(const ConstrainMode);
+ void setConstrainMode(ConstrainMode);
// Viewport mode
ViewportMode getViewportMode() const;
@@ -243,7 +243,7 @@ private:
mat4 coordinatePointMatrix(const mat4& projMatrix) const;
mat4 getPixelMatrix() const;
- void setScalePoint(const double scale, const ScreenCoordinate& point);
+ void setScalePoint(double scale, const ScreenCoordinate& point);
void updateMatricesIfNeeded() const;
bool needsMatricesUpdate() const { return requestMatricesUpdate; }
diff --git a/src/mbgl/programs/fill_extrusion_program.hpp b/src/mbgl/programs/fill_extrusion_program.hpp
index 961f604734..f92bd7c968 100644
--- a/src/mbgl/programs/fill_extrusion_program.hpp
+++ b/src/mbgl/programs/fill_extrusion_program.hpp
@@ -85,8 +85,8 @@ public:
};
}
- static LayoutUniformValues
- layoutUniformValues(mat4, const TransformState&, const float opacity, const EvaluatedLight&, const float verticalGradient);
+ static LayoutUniformValues layoutUniformValues(
+ mat4, const TransformState&, float opacity, const EvaluatedLight&, float verticalGradient);
};
class FillExtrusionPatternProgram : public Program<
@@ -106,11 +106,11 @@ public:
const CrossfadeParameters&,
const UnwrappedTileID&,
const TransformState&,
- const float opacity,
- const float heightFactor,
- const float pixelRatio,
+ float opacity,
+ float heightFactor,
+ float pixelRatio,
const EvaluatedLight&,
- const float verticalGradient);
+ float verticalGradient);
};
using FillExtrusionLayoutVertex = FillExtrusionProgram::LayoutVertex;
diff --git a/src/mbgl/programs/fill_program.hpp b/src/mbgl/programs/fill_program.hpp
index 99314c51b0..da39fe40b7 100644
--- a/src/mbgl/programs/fill_program.hpp
+++ b/src/mbgl/programs/fill_program.hpp
@@ -72,7 +72,7 @@ public:
const CrossfadeParameters& crossfade,
const UnwrappedTileID&,
const TransformState&,
- const float pixelRatio);
+ float pixelRatio);
};
class FillOutlineProgram : public Program<
diff --git a/src/mbgl/programs/line_program.hpp b/src/mbgl/programs/line_program.hpp
index fe58db4173..145ac9d6cf 100644
--- a/src/mbgl/programs/line_program.hpp
+++ b/src/mbgl/programs/line_program.hpp
@@ -88,12 +88,11 @@ public:
*/
static const int8_t extrudeScale = 63;
- static LayoutUniformValues
- layoutUniformValues(const style::LinePaintProperties::PossiblyEvaluated&,
- const RenderTile&,
- const TransformState&,
- const std::array<float, 2>& pixelsToGLUnits,
- const float pixelRatio);
+ static LayoutUniformValues layoutUniformValues(const style::LinePaintProperties::PossiblyEvaluated&,
+ const RenderTile&,
+ const TransformState&,
+ const std::array<float, 2>& pixelsToGLUnits,
+ float pixelRatio);
};
class LinePatternProgram : public Program<
@@ -115,14 +114,13 @@ class LinePatternProgram : public Program<
public:
using Program::Program;
- static LayoutUniformValues
- layoutUniformValues(const style::LinePaintProperties::PossiblyEvaluated&,
- const RenderTile&,
- const TransformState&,
- const std::array<float, 2>& pixelsToGLUnits,
- const float pixelRatio,
- Size atlasSize,
- const CrossfadeParameters& crossfade);
+ static LayoutUniformValues layoutUniformValues(const style::LinePaintProperties::PossiblyEvaluated&,
+ const RenderTile&,
+ const TransformState&,
+ const std::array<float, 2>& pixelsToGLUnits,
+ float pixelRatio,
+ Size atlasSize,
+ const CrossfadeParameters& crossfade);
};
class LineSDFProgram : public Program<
@@ -175,12 +173,11 @@ class LineGradientProgram : public Program<
public:
using Program::Program;
- static LayoutUniformValues
- layoutUniformValues(const style::LinePaintProperties::PossiblyEvaluated&,
- const RenderTile&,
- const TransformState&,
- const std::array<float, 2>& pixelsToGLUnits,
- const float pixelRatio);
+ static LayoutUniformValues layoutUniformValues(const style::LinePaintProperties::PossiblyEvaluated&,
+ const RenderTile&,
+ const TransformState&,
+ const std::array<float, 2>& pixelsToGLUnits,
+ float pixelRatio);
};
using LineLayoutVertex = LineProgram::LayoutVertex;
diff --git a/src/mbgl/programs/symbol_program.hpp b/src/mbgl/programs/symbol_program.hpp
index 6a76aeefec..0a49e5c7ac 100644
--- a/src/mbgl/programs/symbol_program.hpp
+++ b/src/mbgl/programs/symbol_program.hpp
@@ -73,9 +73,9 @@ public:
uniforms::size>;
using UniformValues = gfx::UniformValues<UniformList>;
- static std::unique_ptr<SymbolSizeBinder> create(const float tileZoom,
+ static std::unique_ptr<SymbolSizeBinder> create(float tileZoom,
const style::PropertyValue<float>& sizeProperty,
- const float defaultValue);
+ float defaultValue);
virtual Range<float> getVertexSizeData(const GeometryTileFeature& feature) = 0;
virtual ZoomEvaluatedSize evaluateForZoom(float currentZoom) const = 0;
@@ -406,15 +406,15 @@ class SymbolIconProgram : public SymbolProgram<
public:
using SymbolProgram::SymbolProgram;
- static LayoutUniformValues layoutUniformValues(const bool isText,
- const bool hasVariablePacement,
+ static LayoutUniformValues layoutUniformValues(bool isText,
+ bool hasVariablePacement,
const style::SymbolPropertyValues&,
const Size& texsize,
const std::array<float, 2>& pixelsToGLUnits,
- const bool alongLine,
+ bool alongLine,
const RenderTile&,
const TransformState&,
- const float symbolFadeChange);
+ float symbolFadeChange);
};
enum class SymbolSDFPart {
@@ -457,17 +457,17 @@ public:
using BaseProgram::BaseProgram;
- static LayoutUniformValues layoutUniformValues(const bool isText,
- const bool hasVariablePacement,
+ static LayoutUniformValues layoutUniformValues(bool isText,
+ bool hasVariablePacement,
const style::SymbolPropertyValues&,
const Size& texsize,
const std::array<float, 2>& pixelsToGLUnits,
- const float pixelRatio,
- const bool alongLine,
+ float pixelRatio,
+ bool alongLine,
const RenderTile&,
const TransformState&,
- const float SymbolFadeChange,
- const SymbolSDFPart);
+ float SymbolFadeChange,
+ SymbolSDFPart);
};
using SymbolTextAndIconProgramUniforms = TypeList<uniforms::texsize_icon>;
@@ -491,17 +491,17 @@ public:
using BaseProgram::BaseProgram;
- static LayoutUniformValues layoutUniformValues(const bool hasVariablePacement,
+ static LayoutUniformValues layoutUniformValues(bool hasVariablePacement,
const style::SymbolPropertyValues&,
const Size& texsize,
const Size& texsize_icon,
const std::array<float, 2>& pixelsToGLUnits,
- const float pixelRatio,
- const bool alongLine,
+ float pixelRatio,
+ bool alongLine,
const RenderTile&,
const TransformState&,
- const float SymbolFadeChange,
- const SymbolSDFPart);
+ float SymbolFadeChange,
+ SymbolSDFPart);
};
class SymbolSDFIconProgram : public SymbolSDFProgram<SymbolSDFIconProgram, style::IconPaintProperties> {
diff --git a/src/mbgl/renderer/buckets/circle_bucket.hpp b/src/mbgl/renderer/buckets/circle_bucket.hpp
index 221deb5f17..1abd9c77f6 100644
--- a/src/mbgl/renderer/buckets/circle_bucket.hpp
+++ b/src/mbgl/renderer/buckets/circle_bucket.hpp
@@ -18,8 +18,8 @@ public:
using PossiblyEvaluatedLayoutProperties = style::CircleLayoutProperties::PossiblyEvaluated;
CircleBucket(const std::map<std::string, Immutable<style::LayerProperties>>& layerPaintProperties,
- const MapMode mode,
- const float zoom);
+ MapMode mode,
+ float zoom);
~CircleBucket() override;
bool hasData() const override;
diff --git a/src/mbgl/renderer/buckets/fill_bucket.hpp b/src/mbgl/renderer/buckets/fill_bucket.hpp
index baa605a299..2812e1fde0 100644
--- a/src/mbgl/renderer/buckets/fill_bucket.hpp
+++ b/src/mbgl/renderer/buckets/fill_bucket.hpp
@@ -22,8 +22,8 @@ public:
FillBucket(const PossiblyEvaluatedLayoutProperties& layout,
const std::map<std::string, Immutable<style::LayerProperties>>& layerPaintProperties,
- const float zoom,
- const uint32_t overscaling);
+ float zoom,
+ uint32_t overscaling);
void addFeature(const GeometryTileFeature&,
const GeometryCollection&,
diff --git a/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp b/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp
index 833eee7a73..7143d4326d 100644
--- a/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp
+++ b/src/mbgl/renderer/buckets/fill_extrusion_bucket.hpp
@@ -21,8 +21,8 @@ public:
FillExtrusionBucket(const PossiblyEvaluatedLayoutProperties&,
const std::map<std::string, Immutable<style::LayerProperties>>&,
- const float,
- const uint32_t);
+ float,
+ uint32_t);
void addFeature(const GeometryTileFeature&,
const GeometryCollection&,
diff --git a/src/mbgl/renderer/buckets/line_bucket.hpp b/src/mbgl/renderer/buckets/line_bucket.hpp
index 86aa91160c..48092f41c0 100644
--- a/src/mbgl/renderer/buckets/line_bucket.hpp
+++ b/src/mbgl/renderer/buckets/line_bucket.hpp
@@ -21,8 +21,8 @@ public:
LineBucket(PossiblyEvaluatedLayoutProperties layout,
const std::map<std::string, Immutable<style::LayerProperties>>& layerPaintProperties,
- const float zoom,
- const uint32_t overscaling);
+ float zoom,
+ uint32_t overscaling);
~LineBucket() override;
void addFeature(const GeometryTileFeature&,
diff --git a/src/mbgl/renderer/buckets/symbol_bucket.hpp b/src/mbgl/renderer/buckets/symbol_bucket.hpp
index 5577eac2d9..c6a07dde1c 100644
--- a/src/mbgl/renderer/buckets/symbol_bucket.hpp
+++ b/src/mbgl/renderer/buckets/symbol_bucket.hpp
@@ -75,7 +75,7 @@ public:
std::string bucketName_,
const std::vector<SymbolInstance>&&,
const std::vector<SortKeyRange>&&,
- const float tilePixelRatio,
+ float tilePixelRatio,
bool allowVerticalPlacement,
std::vector<style::TextWritingModeType> placementModes,
bool iconsInText);
@@ -96,10 +96,9 @@ public:
bool hasTextCollisionCircleData() const;
bool hasFormatSectionOverrides() const;
-
- void sortFeatures(const float angle);
+ void sortFeatures(float angle);
// Returns references to the `symbolInstances` items, sorted by viewport Y.
- SymbolInstanceReferences getSortedSymbols(const float angle) const;
+ SymbolInstanceReferences getSortedSymbols(float angle) const;
// Returns references to the `symbolInstances` items, which belong to the `sortKeyRange` range;
// returns references to all the symbols if |sortKeyRange| is `nullopt`.
SymbolInstanceReferences getSymbols(const optional<SortKeyRange>& sortKeyRange = nullopt) const;
diff --git a/src/mbgl/renderer/layers/render_circle_layer.hpp b/src/mbgl/renderer/layers/render_circle_layer.hpp
index 70af20f0cf..d551e9e37d 100644
--- a/src/mbgl/renderer/layers/render_circle_layer.hpp
+++ b/src/mbgl/renderer/layers/render_circle_layer.hpp
@@ -18,8 +18,13 @@ private:
bool hasCrossfade() const override;
void render(PaintParameters&) override;
- bool queryIntersectsFeature(const GeometryCoordinates&, const GeometryTileFeature&, const float,
- const TransformState&, const float, const mat4&, const FeatureState&) const override;
+ bool queryIntersectsFeature(const GeometryCoordinates&,
+ const GeometryTileFeature&,
+ float,
+ const TransformState&,
+ float,
+ const mat4&,
+ const FeatureState&) const override;
// Paint properties
style::CirclePaintProperties::Unevaluated unevaluated;
diff --git a/src/mbgl/renderer/layers/render_fill_extrusion_layer.hpp b/src/mbgl/renderer/layers/render_fill_extrusion_layer.hpp
index 0e6a747c71..558ea8cdb0 100644
--- a/src/mbgl/renderer/layers/render_fill_extrusion_layer.hpp
+++ b/src/mbgl/renderer/layers/render_fill_extrusion_layer.hpp
@@ -20,8 +20,13 @@ private:
bool is3D() const override;
void render(PaintParameters&) override;
- bool queryIntersectsFeature(const GeometryCoordinates&, const GeometryTileFeature&, const float,
- const TransformState&, const float, const mat4&, const FeatureState&) const override;
+ bool queryIntersectsFeature(const GeometryCoordinates&,
+ const GeometryTileFeature&,
+ float,
+ const TransformState&,
+ float,
+ const mat4&,
+ const FeatureState&) const override;
// Paint properties
style::FillExtrusionPaintProperties::Unevaluated unevaluated;
diff --git a/src/mbgl/renderer/layers/render_fill_layer.hpp b/src/mbgl/renderer/layers/render_fill_layer.hpp
index 12484dbfb1..f3ef9ab66e 100644
--- a/src/mbgl/renderer/layers/render_fill_layer.hpp
+++ b/src/mbgl/renderer/layers/render_fill_layer.hpp
@@ -21,8 +21,13 @@ private:
bool hasCrossfade() const override;
void render(PaintParameters&) override;
- bool queryIntersectsFeature(const GeometryCoordinates&, const GeometryTileFeature&, const float,
- const TransformState&, const float, const mat4&, const FeatureState&) const override;
+ bool queryIntersectsFeature(const GeometryCoordinates&,
+ const GeometryTileFeature&,
+ float,
+ const TransformState&,
+ float,
+ const mat4&,
+ const FeatureState&) const override;
// Paint properties
style::FillPaintProperties::Unevaluated unevaluated;
diff --git a/src/mbgl/renderer/layers/render_heatmap_layer.hpp b/src/mbgl/renderer/layers/render_heatmap_layer.hpp
index b7a03a6ba5..7085a87c90 100644
--- a/src/mbgl/renderer/layers/render_heatmap_layer.hpp
+++ b/src/mbgl/renderer/layers/render_heatmap_layer.hpp
@@ -23,8 +23,13 @@ private:
void upload(gfx::UploadPass&) override;
void render(PaintParameters&) override;
- bool queryIntersectsFeature(const GeometryCoordinates&, const GeometryTileFeature&, const float,
- const TransformState&, const float, const mat4&, const FeatureState&) const override;
+ bool queryIntersectsFeature(const GeometryCoordinates&,
+ const GeometryTileFeature&,
+ float,
+ const TransformState&,
+ float,
+ const mat4&,
+ const FeatureState&) const override;
void updateColorRamp();
// Paint properties
diff --git a/src/mbgl/renderer/layers/render_line_layer.hpp b/src/mbgl/renderer/layers/render_line_layer.hpp
index 1914a82b77..fb5d64fcb2 100644
--- a/src/mbgl/renderer/layers/render_line_layer.hpp
+++ b/src/mbgl/renderer/layers/render_line_layer.hpp
@@ -24,13 +24,18 @@ private:
void upload(gfx::UploadPass&) override;
void render(PaintParameters&) override;
- bool queryIntersectsFeature(const GeometryCoordinates&, const GeometryTileFeature&, const float,
- const TransformState&, const float, const mat4&, const FeatureState&) const override;
+ bool queryIntersectsFeature(const GeometryCoordinates&,
+ const GeometryTileFeature&,
+ float,
+ const TransformState&,
+ float,
+ const mat4&,
+ const FeatureState&) const override;
// Paint properties
style::LinePaintProperties::Unevaluated unevaluated;
- float getLineWidth(const GeometryTileFeature&, const float, const FeatureState&) const;
+ float getLineWidth(const GeometryTileFeature&, float, const FeatureState&) const;
void updateColorRamp();
PremultipliedImage colorRamp;
diff --git a/src/mbgl/renderer/render_tile.hpp b/src/mbgl/renderer/render_tile.hpp
index 448d449984..f2ea1a22c2 100644
--- a/src/mbgl/renderer/render_tile.hpp
+++ b/src/mbgl/renderer/render_tile.hpp
@@ -66,7 +66,7 @@ public:
const std::array<float, 2>& translation,
style::TranslateAnchorType anchor,
const TransformState& state,
- const bool inViewportPixelUnits) const;
+ bool inViewportPixelUnits) const;
void setFeatureState(const LayerFeatureStates&);
diff --git a/src/mbgl/text/check_max_angle.hpp b/src/mbgl/text/check_max_angle.hpp
index c95661160c..d08d8f0cce 100644
--- a/src/mbgl/text/check_max_angle.hpp
+++ b/src/mbgl/text/check_max_angle.hpp
@@ -6,10 +6,7 @@ namespace mbgl {
class Anchor;
-bool checkMaxAngle(const GeometryCoordinates& line,
- const Anchor& anchor,
- const float labelLength,
- const float windowSize,
- const float maxAngle);
+bool checkMaxAngle(
+ const GeometryCoordinates& line, const Anchor& anchor, float labelLength, float windowSize, float maxAngle);
} // namespace mbgl
diff --git a/src/mbgl/text/collision_feature.hpp b/src/mbgl/text/collision_feature.hpp
index 40f0f5faba..f9ad659570 100644
--- a/src/mbgl/text/collision_feature.hpp
+++ b/src/mbgl/text/collision_feature.hpp
@@ -122,17 +122,17 @@ public:
CollisionFeature(const GeometryCoordinates& line,
const Anchor&,
- const float top,
- const float bottom,
- const float left,
- const float right,
+ float top,
+ float bottom,
+ float left,
+ float right,
const optional<Padding>& collisionPadding,
- const float boxScale,
- const float padding,
- const style::SymbolPlacementType,
+ float boxScale,
+ float padding,
+ style::SymbolPlacementType,
IndexedSubfeature,
- const float overscaling,
- const float rotate);
+ float overscaling,
+ float rotate);
std::vector<CollisionBox> boxes;
IndexedSubfeature indexedFeature;
@@ -142,9 +142,9 @@ private:
void bboxifyLabel(const GeometryCoordinates& line,
GeometryCoordinate& anchorPoint,
std::size_t segment,
- const float length,
- const float boxSize,
- const float overscaling);
+ float length,
+ float boxSize,
+ float overscaling);
};
} // namespace mbgl
diff --git a/src/mbgl/text/collision_index.hpp b/src/mbgl/text/collision_index.hpp
index d22d962069..1fccdf4930 100644
--- a/src/mbgl/text/collision_index.hpp
+++ b/src/mbgl/text/collision_index.hpp
@@ -29,20 +29,20 @@ public:
IntersectStatus intersectsTileEdges(const CollisionBox&,
Point<float> shift,
const mat4& posMatrix,
- const float textPixelRatio,
+ float textPixelRatio,
const CollisionBoundaries& tileEdges) const;
std::pair<bool, bool> placeFeature(
const CollisionFeature& feature,
Point<float> shift,
const mat4& posMatrix,
const mat4& labelPlaneMatrix,
- const float textPixelRatio,
+ float textPixelRatio,
const PlacedSymbol& symbol,
- const float scale,
- const float fontSize,
- const bool allowOverlap,
- const bool pitchWithMap,
- const bool collisionDebug,
+ float scale,
+ float fontSize,
+ bool allowOverlap,
+ bool pitchWithMap,
+ bool collisionDebug,
const optional<CollisionBoundaries>& avoidEdges,
const optional<std::function<bool(const IndexedSubfeature&)>>& collisionGroupPredicate,
std::vector<ProjectedCollisionBox>& /*out*/);
@@ -67,19 +67,23 @@ private:
const CollisionFeature& feature,
const mat4& posMatrix,
const mat4& labelPlaneMatrix,
- const float textPixelRatio,
+ float textPixelRatio,
const PlacedSymbol& symbol,
- const float scale,
- const float fontSize,
- const bool allowOverlap,
- const bool pitchWithMap,
- const bool collisionDebug,
+ float scale,
+ float fontSize,
+ bool allowOverlap,
+ bool pitchWithMap,
+ bool collisionDebug,
const optional<CollisionBoundaries>& avoidEdges,
const optional<std::function<bool(const IndexedSubfeature&)>>& collisionGroupPredicate,
std::vector<ProjectedCollisionBox>& /*out*/);
- float approximateTileDistance(const TileDistance& tileDistance, const float lastSegmentAngle, const float pixelsToTileUnits, const float cameraToAnchorDistance, const bool pitchWithMap);
-
+ float approximateTileDistance(const TileDistance& tileDistance,
+ float lastSegmentAngle,
+ float pixelsToTileUnits,
+ float cameraToAnchorDistance,
+ bool pitchWithMap);
+
std::pair<float,float> projectAnchor(const mat4& posMatrix, const Point<float>& point) const;
std::pair<Point<float>,float> projectAndGetPerspectiveRatio(const mat4& posMatrix, const Point<float>& point) const;
Point<float> projectPoint(const mat4& posMatrix, const Point<float>& point) const;
diff --git a/src/mbgl/text/get_anchors.hpp b/src/mbgl/text/get_anchors.hpp
index 8fd22051a4..19938b666b 100644
--- a/src/mbgl/text/get_anchors.hpp
+++ b/src/mbgl/text/get_anchors.hpp
@@ -8,23 +8,22 @@ namespace mbgl {
Anchors getAnchors(const GeometryCoordinates& line,
float spacing,
- const float maxAngle,
- const float textLeft,
- const float textRight,
- const float iconLeft,
- const float iconRight,
- const float glyphSize,
- const float boxScale,
- const float overscaling);
+ float maxAngle,
+ float textLeft,
+ float textRight,
+ float iconLeft,
+ float iconRight,
+ float glyphSize,
+ float boxScale,
+ float overscaling);
optional<Anchor> getCenterAnchor(const GeometryCoordinates& line,
- const float maxAngle,
- const float textLeft,
- const float textRight,
- const float iconLeft,
- const float iconRight,
- const float glyphSize,
- const float boxScale);
-
+ float maxAngle,
+ float textLeft,
+ float textRight,
+ float iconLeft,
+ float iconRight,
+ float glyphSize,
+ float boxScale);
} // namespace mbgl
diff --git a/src/mbgl/text/placement.hpp b/src/mbgl/text/placement.hpp
index 6daa09180e..f530b6c5f7 100644
--- a/src/mbgl/text/placement.hpp
+++ b/src/mbgl/text/placement.hpp
@@ -98,7 +98,7 @@ public:
void setPlacement(Immutable<Placement>);
const Immutable<Placement>& getPlacement() const { return placement; }
void setPlacementStale() { stale = true; }
- bool placementIsRecent(TimePoint now, const float zoom, optional<Duration> periodOverride = nullopt) const;
+ bool placementIsRecent(TimePoint now, float zoom, optional<Duration> periodOverride = nullopt) const;
bool hasTransitions(TimePoint now) const;
private:
@@ -128,9 +128,9 @@ public:
const CollisionIndex& getCollisionIndex() const;
TimePoint getCommitTime() const { return commitTime; }
- Duration getUpdatePeriod(const float zoom) const;
+ Duration getUpdatePeriod(float zoom) const;
- float zoomAdjustment(const float zoom) const;
+ float zoomAdjustment(float zoom) const;
const JointPlacement* getSymbolPlacement(const SymbolInstance&) const;
const RetainedQueryData& getQueryData(uint32_t bucketInstanceId) const;
diff --git a/src/mbgl/text/quads.hpp b/src/mbgl/text/quads.hpp
index 18e6ce53c5..74c5d346cd 100644
--- a/src/mbgl/text/quads.hpp
+++ b/src/mbgl/text/quads.hpp
@@ -63,7 +63,7 @@ SymbolQuads getIconQuads(const PositionedIcon& shapedIcon,
bool hasIconTextFit);
SymbolQuads getGlyphQuads(const Shaping& shapedText,
- const std::array<float, 2> textOffset,
+ std::array<float, 2> textOffset,
const style::SymbolLayoutProperties::Evaluated&,
style::SymbolPlacementType placement,
const ImageMap& imageMap,
diff --git a/src/mbgl/text/shaping.hpp b/src/mbgl/text/shaping.hpp
index 5a65a1bf3a..e4362257ce 100644
--- a/src/mbgl/text/shaping.hpp
+++ b/src/mbgl/text/shaping.hpp
@@ -66,10 +66,10 @@ public:
// Updates shaped icon's bounds based on shaped text's bounds and provided
// layout properties.
void fitIconToText(const Shaping& shapedText,
- const style::IconTextFitType textFit,
+ style::IconTextFitType textFit,
const std::array<float, 4>& padding,
const std::array<float, 2>& iconOffset,
- const float fontScale);
+ float fontScale);
const ImagePosition& image() const { return _image; }
float top() const { return _top; }
@@ -86,7 +86,7 @@ Shaping getShaping(const TaggedString& string,
style::TextJustifyType textJustify,
float spacing,
const std::array<float, 2>& translate,
- const WritingModeType,
+ WritingModeType,
BiDi& bidi,
const GlyphMap& glyphMap,
const GlyphPositions& glyphPositions,
diff --git a/src/mbgl/tile/geometry_tile.hpp b/src/mbgl/tile/geometry_tile.hpp
index 9d746d9637..ac55c17904 100644
--- a/src/mbgl/tile/geometry_tile.hpp
+++ b/src/mbgl/tile/geometry_tile.hpp
@@ -41,7 +41,7 @@ public:
std::unique_ptr<TileRenderData> createRenderData() override;
void setLayers(const std::vector<Immutable<style::LayerProperties>>&) override;
- void setShowCollisionBoxes(const bool showCollisionBoxes) override;
+ void setShowCollisionBoxes(bool showCollisionBoxes) override;
void onGlyphsAvailable(GlyphMap) override;
void onImagesAvailable(ImageMap, ImageMap, ImageVersionMap versionMap, uint64_t imageCorrelationID) override;
diff --git a/src/mbgl/tile/geometry_tile_worker.hpp b/src/mbgl/tile/geometry_tile_worker.hpp
index 9ac5113b53..ac18f2d12d 100644
--- a/src/mbgl/tile/geometry_tile_worker.hpp
+++ b/src/mbgl/tile/geometry_tile_worker.hpp
@@ -33,9 +33,9 @@ public:
OverscaledTileID,
std::string,
const std::atomic<bool>&,
- const MapMode,
- const float pixelRatio,
- const bool showCollisionBoxes_);
+ MapMode,
+ float pixelRatio,
+ bool showCollisionBoxes_);
~GeometryTileWorker();
void setLayers(std::vector<Immutable<style::LayerProperties>>,
diff --git a/src/mbgl/tile/raster_dem_tile.hpp b/src/mbgl/tile/raster_dem_tile.hpp
index 0cfaedd88d..68526fdb34 100644
--- a/src/mbgl/tile/raster_dem_tile.hpp
+++ b/src/mbgl/tile/raster_dem_tile.hpp
@@ -76,8 +76,8 @@ public:
bool layerPropertiesUpdated(const Immutable<style::LayerProperties>& layerProperties) override;
HillshadeBucket* getBucket() const;
- void backfillBorder(const RasterDEMTile& borderTile, const DEMTileNeighbors mask);
-
+ void backfillBorder(const RasterDEMTile& borderTile, DEMTileNeighbors mask);
+
// neighboringTiles is a bitmask for which neighboring tiles have been backfilled
// there are max 8 possible neighboring tiles, so each bit represents one neighbor
DEMTileNeighbors neighboringTiles = DEMTileNeighbors::Empty;
diff --git a/src/mbgl/util/grid_index.hpp b/src/mbgl/util/grid_index.hpp
index cb38023e59..502b1d99a0 100644
--- a/src/mbgl/util/grid_index.hpp
+++ b/src/mbgl/util/grid_index.hpp
@@ -56,8 +56,7 @@ constexpr bool operator!=(circle<T> const& lhs, circle<T> const& rhs)
template <class T>
class GridIndex {
public:
-
- GridIndex(const float width_, const float height_, const uint32_t cellSize_);
+ GridIndex(float width_, float height_, uint32_t cellSize_);
using BBox = mapbox::geometry::box<float>;
using BCircle = geometry::circle<float>;
@@ -81,9 +80,9 @@ private:
void query(const BBox&, std::function<bool (const T&, const BBox&)>) const;
void query(const BCircle&, std::function<bool (const T&, const BBox&)>) const;
- std::size_t convertToXCellCoord(const float x) const;
- std::size_t convertToYCellCoord(const float y) const;
-
+ std::size_t convertToXCellCoord(float x) const;
+ std::size_t convertToYCellCoord(float y) const;
+
bool boxesCollide(const BBox&, const BBox&) const;
bool circlesCollide(const BCircle&, const BCircle&) const;
bool circleAndBoxCollide(const BCircle&, const BBox&) const;