summaryrefslogtreecommitdiff
path: root/include
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 /include
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.
Diffstat (limited to 'include')
-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
9 files changed, 11 insertions, 14 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;