[core] Fix performance-move-const-arg
This commit is contained in:
@@ -16,10 +16,14 @@ namespace mbgl {
|
||||
|
||||
// OfflineTilePyramidRegionDefinition
|
||||
|
||||
OfflineTilePyramidRegionDefinition::OfflineTilePyramidRegionDefinition(
|
||||
std::string styleURL_, LatLngBounds bounds_, double minZoom_, double maxZoom_, float pixelRatio_, bool includeIdeographs_)
|
||||
OfflineTilePyramidRegionDefinition::OfflineTilePyramidRegionDefinition(std::string styleURL_,
|
||||
LatLngBounds bounds_,
|
||||
double minZoom_,
|
||||
double maxZoom_,
|
||||
float pixelRatio_,
|
||||
bool includeIdeographs_)
|
||||
: styleURL(std::move(styleURL_)),
|
||||
bounds(std::move(bounds_)),
|
||||
bounds(bounds_),
|
||||
minZoom(minZoom_),
|
||||
maxZoom(maxZoom_),
|
||||
pixelRatio(pixelRatio_),
|
||||
@@ -30,7 +34,6 @@ OfflineTilePyramidRegionDefinition::OfflineTilePyramidRegionDefinition(
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// OfflineGeometryRegionDefinition
|
||||
|
||||
OfflineGeometryRegionDefinition::OfflineGeometryRegionDefinition(std::string styleURL_, Geometry<double> geometry_, double minZoom_, double maxZoom_, float pixelRatio_, bool includeIdeographs_)
|
||||
|
||||
@@ -433,7 +433,7 @@ void OfflineDownload::ensureResource(Resource&& resource,
|
||||
}
|
||||
}
|
||||
|
||||
if (result) resourcesToBeMarkedAsUsed.emplace_back(std::move(resource));
|
||||
if (result) resourcesToBeMarkedAsUsed.emplace_back(resource);
|
||||
return result;
|
||||
};
|
||||
|
||||
|
||||
@@ -78,10 +78,12 @@ public:
|
||||
if (resourceTransform) {
|
||||
// Request the ResourceTransform actor a new url and replace the resource url with the
|
||||
// transformed one before proceeding to schedule the request.
|
||||
resourceTransform->invoke(&ResourceTransform::transform, request->resource.kind,
|
||||
std::move(request->resource.url), [ref = request->actor()](const std::string&& url) {
|
||||
ref.invoke(&OnlineFileRequest::setTransformedURL, std::move(url));
|
||||
});
|
||||
resourceTransform->invoke(&ResourceTransform::transform,
|
||||
request->resource.kind,
|
||||
std::move(request->resource.url),
|
||||
[ref = request->actor()](const std::string&& url) {
|
||||
ref.invoke(&OnlineFileRequest::setTransformedURL, url);
|
||||
});
|
||||
} else {
|
||||
request->schedule();
|
||||
}
|
||||
@@ -466,8 +468,8 @@ void OnlineFileRequest::networkIsReachableAgain() {
|
||||
}
|
||||
|
||||
void OnlineFileRequest::setTransformedURL(const std::string&& url) {
|
||||
resource.url = std::move(url);
|
||||
schedule();
|
||||
resource.url = url;
|
||||
schedule();
|
||||
}
|
||||
|
||||
ActorRef<OnlineFileRequest> OnlineFileRequest::actor() {
|
||||
|
||||
Reference in New Issue
Block a user