From dffe00feeade4d65d10deecdc196add14b791c11 Mon Sep 17 00:00:00 2001 From: "Thiago Marcos P. Santos" Date: Fri, 27 Mar 2020 18:30:35 +0200 Subject: [core] Fix readability-avoid-const-params-in-decls errors in header files As reported by clang-tidy-8. --- include/mbgl/storage/database_file_source.hpp | 2 +- include/mbgl/style/expression/get_covering_stops.hpp | 3 +-- include/mbgl/style/expression/step.hpp | 2 +- include/mbgl/style/expression/value.hpp | 2 +- include/mbgl/style/property_expression.hpp | 4 ++-- include/mbgl/style/sources/geojson_source.hpp | 6 ++---- include/mbgl/style/sources/image_source.hpp | 2 +- include/mbgl/util/chrono.hpp | 2 +- include/mbgl/util/geo.hpp | 2 +- 9 files changed, 11 insertions(+), 14 deletions(-) (limited to 'include') 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)>); 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 getCoveringStops(const std::map>& stops, - const double lower, const double upper); +Range getCoveringStops(const std::map>& 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& visit) const; const std::unique_ptr& getInput() const { return input; } - Range getCoveringStops(const double lower, const double upper) const; + Range 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 { template <> struct ValueConverter { static type::Type expressionType() { return type::Number; } - static Value toExpressionValue(const float value); + static Value toExpressionValue(float value); static optional 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&, const float) const noexcept; - Range getCoveringStops(const float, const float) const noexcept; + float interpolationFactor(const Range&, float) const noexcept; + Range 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&) = 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 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); + ImageSource(std::string id, std::array); ~ImageSource() override; optional 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