summaryrefslogtreecommitdiff
path: root/src/mbgl/tile
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2019-09-23 17:41:33 +0300
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2019-09-25 18:59:07 +0300
commitc7bbd5bbef0780df5d0a5498e14051ee63c24e44 (patch)
tree4d1803a26e86327b404dc810709b7ea1c0a9453d /src/mbgl/tile
parent3c23f6f9f7f92ef43cb3d78e5570976058cf49c5 (diff)
downloadqtlocation-mapboxgl-c7bbd5bbef0780df5d0a5498e14051ee63c24e44.tar.gz
[core] Fix performance-move-const-arg
Diffstat (limited to 'src/mbgl/tile')
-rw-r--r--src/mbgl/tile/geometry_tile_data.hpp6
-rw-r--r--src/mbgl/tile/geometry_tile_worker.cpp5
-rw-r--r--src/mbgl/tile/tile.cpp3
-rw-r--r--src/mbgl/tile/vector_tile_data.cpp2
4 files changed, 6 insertions, 10 deletions
diff --git a/src/mbgl/tile/geometry_tile_data.hpp b/src/mbgl/tile/geometry_tile_data.hpp
index 5d43a68388..49620982c1 100644
--- a/src/mbgl/tile/geometry_tile_data.hpp
+++ b/src/mbgl/tile/geometry_tile_data.hpp
@@ -24,8 +24,7 @@ public:
template <class... Args>
GeometryCoordinates(Args&&... args) : std::vector<GeometryCoordinate>(std::forward<Args>(args)...) {}
- GeometryCoordinates(std::initializer_list<GeometryCoordinate> args)
- : std::vector<GeometryCoordinate>(std::move(args)) {}
+ GeometryCoordinates(std::initializer_list<GeometryCoordinate> args) : std::vector<GeometryCoordinate>(args) {}
};
class GeometryCollection : public std::vector<GeometryCoordinates> {
@@ -33,8 +32,7 @@ public:
using coordinate_type = int16_t;
template <class... Args>
GeometryCollection(Args&&... args) : std::vector<GeometryCoordinates>(std::forward<Args>(args)...) {}
- GeometryCollection(std::initializer_list<GeometryCoordinates> args)
- : std::vector<GeometryCoordinates>(std::move(args)) {}
+ GeometryCollection(std::initializer_list<GeometryCoordinates> args) : std::vector<GeometryCoordinates>(args) {}
GeometryCollection(GeometryCollection&&) = default;
GeometryCollection& operator=(GeometryCollection&&) = default;
diff --git a/src/mbgl/tile/geometry_tile_worker.cpp b/src/mbgl/tile/geometry_tile_worker.cpp
index f6af61eb3c..7815e62b75 100644
--- a/src/mbgl/tile/geometry_tile_worker.cpp
+++ b/src/mbgl/tile/geometry_tile_worker.cpp
@@ -37,13 +37,12 @@ GeometryTileWorker::GeometryTileWorker(ActorRef<GeometryTileWorker> self_,
const bool showCollisionBoxes_)
: self(std::move(self_)),
parent(std::move(parent_)),
- id(std::move(id_)),
+ id(id_),
sourceID(std::move(sourceID_)),
obsolete(obsolete_),
mode(mode_),
pixelRatio(pixelRatio_),
- showCollisionBoxes(showCollisionBoxes_) {
-}
+ showCollisionBoxes(showCollisionBoxes_) {}
GeometryTileWorker::~GeometryTileWorker() = default;
diff --git a/src/mbgl/tile/tile.cpp b/src/mbgl/tile/tile.cpp
index 2ebbf76c2a..441f0424aa 100644
--- a/src/mbgl/tile/tile.cpp
+++ b/src/mbgl/tile/tile.cpp
@@ -8,8 +8,7 @@ namespace mbgl {
static TileObserver nullObserver;
-Tile::Tile(Kind kind_, OverscaledTileID id_) : kind(kind_), id(std::move(id_)), observer(&nullObserver) {
-}
+Tile::Tile(Kind kind_, OverscaledTileID id_) : kind(kind_), id(id_), observer(&nullObserver) {}
Tile::~Tile() = default;
diff --git a/src/mbgl/tile/vector_tile_data.cpp b/src/mbgl/tile/vector_tile_data.cpp
index d53f1deba6..c317525bb9 100644
--- a/src/mbgl/tile/vector_tile_data.cpp
+++ b/src/mbgl/tile/vector_tile_data.cpp
@@ -23,7 +23,7 @@ FeatureType VectorTileFeature::getType() const {
optional<Value> VectorTileFeature::getValue(const std::string& key) const {
const optional<Value> value(feature.getValue(key));
- return value->is<NullValue>() ? nullopt : std::move(value);
+ return value->is<NullValue>() ? nullopt : value;
}
const PropertyMap& VectorTileFeature::getProperties() const {