diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-09-23 17:41:33 +0300 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2019-09-25 18:59:07 +0300 |
commit | c7bbd5bbef0780df5d0a5498e14051ee63c24e44 (patch) | |
tree | 4d1803a26e86327b404dc810709b7ea1c0a9453d /include/mbgl/util | |
parent | 3c23f6f9f7f92ef43cb3d78e5570976058cf49c5 (diff) | |
download | qtlocation-mapboxgl-c7bbd5bbef0780df5d0a5498e14051ee63c24e44.tar.gz |
[core] Fix performance-move-const-arg
Diffstat (limited to 'include/mbgl/util')
-rw-r--r-- | include/mbgl/util/geo.hpp | 3 | ||||
-rw-r--r-- | include/mbgl/util/image.hpp | 11 | ||||
-rw-r--r-- | include/mbgl/util/tileset.hpp | 7 |
3 files changed, 7 insertions, 14 deletions
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. |