diff options
Diffstat (limited to 'include')
20 files changed, 64 insertions, 24 deletions
diff --git a/include/mbgl/annotation/annotation.hpp b/include/mbgl/annotation/annotation.hpp index 17728741bb..0d67e90d78 100644 --- a/include/mbgl/annotation/annotation.hpp +++ b/include/mbgl/annotation/annotation.hpp @@ -16,9 +16,7 @@ using AnnotationIDs = std::vector<AnnotationID>; class SymbolAnnotation { public: - SymbolAnnotation(Point<double> geometry_, std::string icon_ = {}) - : geometry(std::move(geometry_)), - icon(std::move(icon_)) {} + SymbolAnnotation(Point<double> geometry_, std::string icon_ = {}) : geometry(geometry_), icon(std::move(icon_)) {} Point<double> geometry; std::string icon; diff --git a/include/mbgl/storage/resource_transform.hpp b/include/mbgl/storage/resource_transform.hpp index 738c497176..b8e3dbac76 100644 --- a/include/mbgl/storage/resource_transform.hpp +++ b/include/mbgl/storage/resource_transform.hpp @@ -12,12 +12,12 @@ class Mailbox; class ResourceTransform { public: - using TransformCallback = std::function<std::string(Resource::Kind kind, const std::string&& url)>; + using TransformCallback = std::function<std::string(Resource::Kind kind, const std::string& url)>; using FinishedCallback = std::function<void(const std::string&&)>; ResourceTransform(ActorRef<ResourceTransform>, TransformCallback&&); - void transform(Resource::Kind, const std::string&& url, FinishedCallback&&); + void transform(Resource::Kind, const std::string& url, FinishedCallback&&); private: TransformCallback transformCallback; diff --git a/include/mbgl/style/conversion_impl.hpp b/include/mbgl/style/conversion_impl.hpp index 0551187f6a..f049ba4ffb 100644 --- a/include/mbgl/style/conversion_impl.hpp +++ b/include/mbgl/style/conversion_impl.hpp @@ -90,6 +90,7 @@ public: } Convertible(Convertible&& v) : vtable(v.vtable) { + // NOLINTNEXTLINE(performance-move-const-arg) vtable->move(std::move(v.storage), storage); } @@ -101,6 +102,7 @@ public: if (this != &v) { vtable->destroy(storage); vtable = v.vtable; + // NOLINTNEXTLINE(performance-move-const-arg) vtable->move(std::move(v.storage), storage); } return *this; diff --git a/include/mbgl/style/expression/is_constant.hpp b/include/mbgl/style/expression/is_constant.hpp index bd758977d8..2861407af0 100644 --- a/include/mbgl/style/expression/is_constant.hpp +++ b/include/mbgl/style/expression/is_constant.hpp @@ -17,7 +17,7 @@ bool isGlobalPropertyConstant(const Expression& expression, const T& properties) } } } - + bool isConstant = true; expression.eachChild([&](const Expression& e) { if (isConstant && !isGlobalPropertyConstant(e, properties)) { @@ -25,7 +25,7 @@ bool isGlobalPropertyConstant(const Expression& expression, const T& properties) } }); return isConstant; -}; +} bool isFeatureConstant(const Expression& expression); bool isZoomConstant(const Expression& e); diff --git a/include/mbgl/style/layers/background_layer.hpp b/include/mbgl/style/layers/background_layer.hpp index 97ab2c0592..4a73ae4a0b 100644 --- a/include/mbgl/style/layers/background_layer.hpp +++ b/include/mbgl/style/layers/background_layer.hpp @@ -1,3 +1,5 @@ +// clang-format off + // This file is generated. Do not edit. #pragma once @@ -57,3 +59,5 @@ protected: } // namespace style } // namespace mbgl + +// clang-format on diff --git a/include/mbgl/style/layers/circle_layer.hpp b/include/mbgl/style/layers/circle_layer.hpp index 62d29964f8..f171805806 100644 --- a/include/mbgl/style/layers/circle_layer.hpp +++ b/include/mbgl/style/layers/circle_layer.hpp @@ -1,3 +1,5 @@ +// clang-format off + // This file is generated. Do not edit. #pragma once @@ -105,3 +107,5 @@ protected: } // namespace style } // namespace mbgl + +// clang-format on diff --git a/include/mbgl/style/layers/fill_extrusion_layer.hpp b/include/mbgl/style/layers/fill_extrusion_layer.hpp index 5ed9b6012c..2e89032ae7 100644 --- a/include/mbgl/style/layers/fill_extrusion_layer.hpp +++ b/include/mbgl/style/layers/fill_extrusion_layer.hpp @@ -1,3 +1,5 @@ +// clang-format off + // This file is generated. Do not edit. #pragma once @@ -87,3 +89,5 @@ protected: } // namespace style } // namespace mbgl + +// clang-format on diff --git a/include/mbgl/style/layers/fill_layer.hpp b/include/mbgl/style/layers/fill_layer.hpp index e029ccc67e..0c4369de4c 100644 --- a/include/mbgl/style/layers/fill_layer.hpp +++ b/include/mbgl/style/layers/fill_layer.hpp @@ -1,3 +1,5 @@ +// clang-format off + // This file is generated. Do not edit. #pragma once @@ -81,3 +83,5 @@ protected: } // namespace style } // namespace mbgl + +// clang-format on diff --git a/include/mbgl/style/layers/heatmap_layer.hpp b/include/mbgl/style/layers/heatmap_layer.hpp index d8863d9952..2023d8c21e 100644 --- a/include/mbgl/style/layers/heatmap_layer.hpp +++ b/include/mbgl/style/layers/heatmap_layer.hpp @@ -1,3 +1,5 @@ +// clang-format off + // This file is generated. Do not edit. #pragma once @@ -70,3 +72,5 @@ protected: } // namespace style } // namespace mbgl + +// clang-format on diff --git a/include/mbgl/style/layers/hillshade_layer.hpp b/include/mbgl/style/layers/hillshade_layer.hpp index 3ec3cdabad..f6b04a0062 100644 --- a/include/mbgl/style/layers/hillshade_layer.hpp +++ b/include/mbgl/style/layers/hillshade_layer.hpp @@ -1,3 +1,5 @@ +// clang-format off + // This file is generated. Do not edit. #pragma once @@ -75,3 +77,5 @@ protected: } // namespace style } // namespace mbgl + +// clang-format on diff --git a/include/mbgl/style/layers/layer.hpp.ejs b/include/mbgl/style/layers/layer.hpp.ejs index 8371f11910..638db5fe4b 100644 --- a/include/mbgl/style/layers/layer.hpp.ejs +++ b/include/mbgl/style/layers/layer.hpp.ejs @@ -3,6 +3,8 @@ const layoutProperties = locals.layoutProperties; const paintProperties = locals.paintProperties; -%> +// clang-format off + // This file is generated. Do not edit. #pragma once @@ -73,3 +75,5 @@ protected: } // namespace style } // namespace mbgl + +// clang-format on diff --git a/include/mbgl/style/layers/line_layer.hpp b/include/mbgl/style/layers/line_layer.hpp index b68753705c..8f1d51295c 100644 --- a/include/mbgl/style/layers/line_layer.hpp +++ b/include/mbgl/style/layers/line_layer.hpp @@ -1,3 +1,5 @@ +// clang-format off + // This file is generated. Do not edit. #pragma once @@ -126,3 +128,5 @@ protected: } // namespace style } // namespace mbgl + +// clang-format on diff --git a/include/mbgl/style/layers/raster_layer.hpp b/include/mbgl/style/layers/raster_layer.hpp index 8bfb1b8e92..ba2ea45428 100644 --- a/include/mbgl/style/layers/raster_layer.hpp +++ b/include/mbgl/style/layers/raster_layer.hpp @@ -1,3 +1,5 @@ +// clang-format off + // This file is generated. Do not edit. #pragma once @@ -87,3 +89,5 @@ protected: } // namespace style } // namespace mbgl + +// clang-format on diff --git a/include/mbgl/style/layers/symbol_layer.hpp b/include/mbgl/style/layers/symbol_layer.hpp index 853c0b282e..b60e991f49 100644 --- a/include/mbgl/style/layers/symbol_layer.hpp +++ b/include/mbgl/style/layers/symbol_layer.hpp @@ -1,3 +1,5 @@ +// clang-format off + // This file is generated. Do not edit. #pragma once @@ -291,3 +293,5 @@ protected: } // namespace style } // namespace mbgl + +// clang-format on diff --git a/include/mbgl/style/light.hpp b/include/mbgl/style/light.hpp index 21a05cf4c8..9a82eb14b5 100644 --- a/include/mbgl/style/light.hpp +++ b/include/mbgl/style/light.hpp @@ -1,3 +1,5 @@ +// clang-format off + // This file is generated. Do not edit. #pragma once @@ -55,3 +57,5 @@ public: } // namespace style } // namespace mbgl + +// clang-format on diff --git a/include/mbgl/style/light.hpp.ejs b/include/mbgl/style/light.hpp.ejs index c3001d982b..a5b907b4dc 100644 --- a/include/mbgl/style/light.hpp.ejs +++ b/include/mbgl/style/light.hpp.ejs @@ -1,6 +1,8 @@ <% const properties = locals.properties; -%> +// clang-format off + // This file is generated. Do not edit. #pragma once @@ -42,3 +44,5 @@ public: } // namespace style } // namespace mbgl + +// clang-format on diff --git a/include/mbgl/tile/tile_id.hpp b/include/mbgl/tile/tile_id.hpp index 2e116bd8cf..c3bdbea5cd 100644 --- a/include/mbgl/tile/tile_id.hpp +++ b/include/mbgl/tile/tile_id.hpp @@ -141,7 +141,7 @@ inline std::array<CanonicalTileID, 4> CanonicalTileID::children() const { } inline OverscaledTileID::OverscaledTileID(uint8_t overscaledZ_, int16_t wrap_, CanonicalTileID canonical_) - : overscaledZ(overscaledZ_), wrap(wrap_), canonical(std::move(canonical_)) { + : overscaledZ(overscaledZ_), wrap(wrap_), canonical(canonical_) { assert(overscaledZ >= canonical.z); } @@ -207,8 +207,7 @@ inline UnwrappedTileID::UnwrappedTileID(uint8_t z_, int64_t x_, int64_t y_) } inline UnwrappedTileID::UnwrappedTileID(int16_t wrap_, CanonicalTileID canonical_) - : wrap(wrap_), canonical(std::move(canonical_)) { -} + : wrap(wrap_), canonical(canonical_) {} inline bool UnwrappedTileID::operator==(const UnwrappedTileID& rhs) const { return wrap == rhs.wrap && canonical == rhs.canonical; diff --git a/include/mbgl/util/geo.hpp b/include/mbgl/util/geo.hpp index a9c1112fd1..170eca4f0a 100644 --- a/include/mbgl/util/geo.hpp +++ b/include/mbgl/util/geo.hpp @@ -170,8 +170,7 @@ private: LatLng ne; bool bounded = true; - LatLngBounds(LatLng sw_, LatLng ne_) - : sw(std::move(sw_)), ne(std::move(ne_)) {} + LatLngBounds(LatLng sw_, LatLng ne_) : sw(sw_), ne(ne_) {} LatLngBounds() : sw({-90, -180}), ne({90, 180}), bounded(false) {} diff --git a/include/mbgl/util/image.hpp b/include/mbgl/util/image.hpp index 4887058f79..e997c02223 100644 --- a/include/mbgl/util/image.hpp +++ b/include/mbgl/util/image.hpp @@ -22,12 +22,9 @@ class Image : private util::noncopyable { public: Image() = default; - Image(Size size_) - : size(std::move(size_)), - data(std::make_unique<uint8_t[]>(bytes())) {} + Image(Size size_) : size(size_), data(std::make_unique<uint8_t[]>(bytes())) {} - Image(Size size_, const uint8_t* srcData, std::size_t srcLength) - : size(std::move(size_)) { + Image(Size size_, const uint8_t* srcData, std::size_t srcLength) : size(size_) { if (srcLength != bytes()) { throw std::invalid_argument("mismatched image size"); } @@ -35,9 +32,7 @@ public: std::copy(srcData, srcData + srcLength, data.get()); } - Image(Size size_, std::unique_ptr<uint8_t[]> data_) - : size(std::move(size_)), - data(std::move(data_)) {} + Image(Size size_, std::unique_ptr<uint8_t[]> data_) : size(size_), data(std::move(data_)) {} Image(Image&& o) : size(o.size), diff --git a/include/mbgl/util/tileset.hpp b/include/mbgl/util/tileset.hpp index ed2b907647..c0885e0eb3 100644 --- a/include/mbgl/util/tileset.hpp +++ b/include/mbgl/util/tileset.hpp @@ -24,18 +24,17 @@ public: DEMEncoding encoding; optional<LatLngBounds> bounds; - Tileset(std::vector<std::string> tiles_ = std::vector<std::string>(), - Range<uint8_t> zoomRange_ = { 0, util::DEFAULT_MAX_ZOOM }, + Range<uint8_t> zoomRange_ = {0, util::DEFAULT_MAX_ZOOM}, std::string attribution_ = {}, Scheme scheme_ = Scheme::XYZ, DEMEncoding encoding_ = DEMEncoding::Mapbox) : tiles(std::move(tiles_)), - zoomRange(std::move(zoomRange_)), + zoomRange(zoomRange_), attribution(std::move(attribution_)), scheme(scheme_), encoding(encoding_), - bounds() {}; + bounds(){}; // TileJSON also includes center and zoom but they are not used by mbgl. |