summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2015-12-01 16:45:39 +0100
committerKonstantin Käfer <mail@kkaefer.com>2015-12-03 15:38:36 +0100
commitdc620f48de48d500298044d8da0ba946b3b0c566 (patch)
tree60110336706627dea9f18821f5d8fc6e9713210a /src
parente12cd6aef4858b09c8ca449e779a58d15e878932 (diff)
downloadqtlocation-mapboxgl-dc620f48de48d500298044d8da0ba946b3b0c566.tar.gz
[core] Fix std::move() misuse that disables copy elision
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/map/map_context.cpp2
-rw-r--r--src/mbgl/map/vector_tile.cpp2
-rw-r--r--src/mbgl/text/get_anchors.cpp2
-rw-r--r--src/mbgl/util/premultiply.cpp4
4 files changed, 5 insertions, 5 deletions
diff --git a/src/mbgl/map/map_context.cpp b/src/mbgl/map/map_context.cpp
index c78a1b771d..e6588f5b36 100644
--- a/src/mbgl/map/map_context.cpp
+++ b/src/mbgl/map/map_context.cpp
@@ -246,7 +246,7 @@ bool MapContext::renderSync(const TransformState& state, const FrameData& frame)
painter->render(*style, frame, data.getAnnotationManager()->getSpriteAtlas());
if (data.mode == MapMode::Still) {
- callback(nullptr, std::move(view.readStillImage()));
+ callback(nullptr, view.readStillImage());
callback = nullptr;
}
diff --git a/src/mbgl/map/vector_tile.cpp b/src/mbgl/map/vector_tile.cpp
index 5144919348..6271322bc4 100644
--- a/src/mbgl/map/vector_tile.cpp
+++ b/src/mbgl/map/vector_tile.cpp
@@ -164,7 +164,7 @@ VectorTileLayer::VectorTileLayer(pbf layer_pbf) {
} else if (layer_pbf.tag == 3) { // keys
keys.emplace(layer_pbf.string(), keys.size());
} else if (layer_pbf.tag == 4) { // values
- values.emplace_back(std::move(parseValue(layer_pbf.message())));
+ values.emplace_back(parseValue(layer_pbf.message()));
} else if (layer_pbf.tag == 5) { // extent
extent = layer_pbf.varint();
} else {
diff --git a/src/mbgl/text/get_anchors.cpp b/src/mbgl/text/get_anchors.cpp
index 6492fd0679..c19bc24958 100644
--- a/src/mbgl/text/get_anchors.cpp
+++ b/src/mbgl/text/get_anchors.cpp
@@ -49,7 +49,7 @@ Anchors resample(const std::vector<Coordinate> &line, const float offset, const
// This has the most effect for short lines in overscaled tiles, since the
// initial offset used in overscaled tiles is calculated to align labels with positions in
// parent tiles instead of placing the label as close to the beginning as possible.
- anchors = std::move(resample(line, distance / 2, spacing, angleWindowSize, maxAngle, labelLength, continuedLine, true));
+ anchors = resample(line, distance / 2, spacing, angleWindowSize, maxAngle, labelLength, continuedLine, true);
}
return anchors;
diff --git a/src/mbgl/util/premultiply.cpp b/src/mbgl/util/premultiply.cpp
index 8a62012251..c7be9a26cd 100644
--- a/src/mbgl/util/premultiply.cpp
+++ b/src/mbgl/util/premultiply.cpp
@@ -23,7 +23,7 @@ PremultipliedImage premultiply(UnassociatedImage&& src) {
b = (b * a + 127) / 255;
}
- return std::move(dst);
+ return dst;
}
UnassociatedImage unpremultiply(PremultipliedImage&& src) {
@@ -46,7 +46,7 @@ UnassociatedImage unpremultiply(PremultipliedImage&& src) {
}
}
- return std::move(dst);
+ return dst;
}
}