summaryrefslogtreecommitdiff
path: root/src/mbgl/renderer
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-20 12:38:09 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-23 20:05:40 +0200
commit9dbd0a666a25b3950d461d41f6c41fc8acea8d81 (patch)
tree757196c0d7efc9c6f198098be5d227d754b0b378 /src/mbgl/renderer
parent76b99eb8e8f0138a1020b01e45bf8fd859051b1c (diff)
downloadqtlocation-mapboxgl-9dbd0a666a25b3950d461d41f6c41fc8acea8d81.tar.gz
[core] Fix modernize-pass-by-value errors
As reported by clang-tidy-8.
Diffstat (limited to 'src/mbgl/renderer')
-rw-r--r--src/mbgl/renderer/buckets/line_bucket.cpp5
-rw-r--r--src/mbgl/renderer/buckets/line_bucket.hpp2
-rw-r--r--src/mbgl/renderer/buckets/symbol_bucket.cpp6
-rw-r--r--src/mbgl/renderer/buckets/symbol_bucket.hpp2
4 files changed, 9 insertions, 6 deletions
diff --git a/src/mbgl/renderer/buckets/line_bucket.cpp b/src/mbgl/renderer/buckets/line_bucket.cpp
index 809d8df6d3..256ce35eb5 100644
--- a/src/mbgl/renderer/buckets/line_bucket.cpp
+++ b/src/mbgl/renderer/buckets/line_bucket.cpp
@@ -5,16 +5,17 @@
#include <mbgl/util/constants.hpp>
#include <cassert>
+#include <utility>
namespace mbgl {
using namespace style;
-LineBucket::LineBucket(const LineBucket::PossiblyEvaluatedLayoutProperties& layout_,
+LineBucket::LineBucket(LineBucket::PossiblyEvaluatedLayoutProperties layout_,
const std::map<std::string, Immutable<LayerProperties>>& layerPaintProperties,
const float zoom_,
const uint32_t overscaling_)
- : layout(layout_), zoom(zoom_), overscaling(overscaling_) {
+ : layout(std::move(layout_)), zoom(zoom_), overscaling(overscaling_) {
for (const auto& pair : layerPaintProperties) {
paintPropertyBinders.emplace(
std::piecewise_construct,
diff --git a/src/mbgl/renderer/buckets/line_bucket.hpp b/src/mbgl/renderer/buckets/line_bucket.hpp
index 5b6a65440e..7ddcedef9f 100644
--- a/src/mbgl/renderer/buckets/line_bucket.hpp
+++ b/src/mbgl/renderer/buckets/line_bucket.hpp
@@ -19,7 +19,7 @@ class LineBucket final : public Bucket {
public:
using PossiblyEvaluatedLayoutProperties = style::LineLayoutProperties::PossiblyEvaluated;
- LineBucket(const PossiblyEvaluatedLayoutProperties& layout,
+ LineBucket(PossiblyEvaluatedLayoutProperties layout,
const std::map<std::string, Immutable<style::LayerProperties>>& layerPaintProperties,
const float zoom,
const uint32_t overscaling);
diff --git a/src/mbgl/renderer/buckets/symbol_bucket.cpp b/src/mbgl/renderer/buckets/symbol_bucket.cpp
index 234e81a9fd..cbdb4bf2ed 100644
--- a/src/mbgl/renderer/buckets/symbol_bucket.cpp
+++ b/src/mbgl/renderer/buckets/symbol_bucket.cpp
@@ -7,6 +7,8 @@
#include <mbgl/text/glyph_atlas.hpp>
#include <mbgl/text/placement.hpp>
+#include <utility>
+
namespace mbgl {
using namespace style;
@@ -21,7 +23,7 @@ SymbolBucket::SymbolBucket(Immutable<style::SymbolLayoutProperties::PossiblyEval
float zoom,
bool iconsNeedLinear_,
bool sortFeaturesByY_,
- const std::string& bucketName_,
+ std::string bucketName_,
const std::vector<SymbolInstance>&& symbolInstances_,
const std::vector<SortKeyRange>&& sortKeyRanges_,
float tilePixelRatio_,
@@ -29,7 +31,7 @@ SymbolBucket::SymbolBucket(Immutable<style::SymbolLayoutProperties::PossiblyEval
std::vector<style::TextWritingModeType> placementModes_,
bool iconsInText_)
: layout(std::move(layout_)),
- bucketLeaderID(bucketName_),
+ bucketLeaderID(std::move(bucketName_)),
iconsNeedLinear(iconsNeedLinear_ || iconSize.isDataDriven() || !iconSize.isZoomConstant()),
sortFeaturesByY(sortFeaturesByY_),
staticUploaded(false),
diff --git a/src/mbgl/renderer/buckets/symbol_bucket.hpp b/src/mbgl/renderer/buckets/symbol_bucket.hpp
index fa845a589a..00ba14589a 100644
--- a/src/mbgl/renderer/buckets/symbol_bucket.hpp
+++ b/src/mbgl/renderer/buckets/symbol_bucket.hpp
@@ -72,7 +72,7 @@ public:
float zoom,
bool iconsNeedLinear,
bool sortFeaturesByY,
- const std::string& bucketLeaderID,
+ std::string bucketLeaderID,
const std::vector<SymbolInstance>&&,
const std::vector<SortKeyRange>&&,
const float tilePixelRatio,