summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThiago Marcos P. Santos <tmpsantos@gmail.com>2020-03-27 18:30:35 +0200
committerThiago Marcos P. Santos <tmpsantos@gmail.com>2020-04-17 13:36:50 +0300
commit46fa69159616860ded192643031f7cb3c10b818b (patch)
tree943a45833a3495b3c498944b9dd6f51f996a2b24 /src
parent563d4b6cac0076e87bd57e5227e20689c05f44fa (diff)
downloadqtlocation-mapboxgl-46fa69159616860ded192643031f7cb3c10b818b.tar.gz
[core] Fix performance-unnecessary-value-param errors in header files
As reported by clang-tidy-8.
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/style/properties.hpp5
-rw-r--r--src/mbgl/tile/tile_loader_impl.hpp4
2 files changed, 3 insertions, 6 deletions
diff --git a/src/mbgl/style/properties.hpp b/src/mbgl/style/properties.hpp
index 39b6672734..f8c247f79f 100644
--- a/src/mbgl/style/properties.hpp
+++ b/src/mbgl/style/properties.hpp
@@ -26,10 +26,7 @@ public:
: value(std::move(value_)) {
}
- Transitioning(Value value_,
- Transitioning<Value> prior_,
- TransitionOptions transition,
- TimePoint now)
+ Transitioning(Value value_, Transitioning<Value> prior_, const TransitionOptions& transition, TimePoint now)
: begin(now + transition.delay.value_or(Duration::zero())),
end(begin + transition.duration.value_or(Duration::zero())),
value(std::move(value_)) {
diff --git a/src/mbgl/tile/tile_loader_impl.hpp b/src/mbgl/tile/tile_loader_impl.hpp
index 51efbb99e9..b12b5c73fb 100644
--- a/src/mbgl/tile/tile_loader_impl.hpp
+++ b/src/mbgl/tile/tile_loader_impl.hpp
@@ -67,7 +67,7 @@ void TileLoader<T>::loadFromCache() {
}
resource.loadingMethod = Resource::LoadingMethod::CacheOnly;
- request = fileSource->request(resource, [this](Response res) {
+ request = fileSource->request(resource, [this](const Response& res) {
request.reset();
tile.setTriedCache();
@@ -137,7 +137,7 @@ void TileLoader<T>::loadFromNetwork() {
// Instead of using Resource::LoadingMethod::All, we're first doing a CacheOnly, and then a
// NetworkOnly request.
resource.loadingMethod = Resource::LoadingMethod::NetworkOnly;
- request = fileSource->request(resource, [this](Response res) { loadedData(res); });
+ request = fileSource->request(resource, [this](const Response& res) { loadedData(res); });
}
} // namespace mbgl