summaryrefslogtreecommitdiff
path: root/src/mbgl/style/sources
diff options
context:
space:
mode:
Diffstat (limited to 'src/mbgl/style/sources')
-rw-r--r--src/mbgl/style/sources/custom_geometry_source.cpp2
-rw-r--r--src/mbgl/style/sources/custom_geometry_source_impl.cpp4
-rw-r--r--src/mbgl/style/sources/custom_geometry_source_impl.hpp4
-rw-r--r--src/mbgl/style/sources/geojson_source.cpp2
-rw-r--r--src/mbgl/style/sources/geojson_source_impl.cpp2
-rw-r--r--src/mbgl/style/sources/image_source.cpp2
-rw-r--r--src/mbgl/style/sources/raster_dem_source.cpp4
-rw-r--r--src/mbgl/style/sources/raster_source.cpp2
-rw-r--r--src/mbgl/style/sources/vector_source.cpp2
9 files changed, 12 insertions, 12 deletions
diff --git a/src/mbgl/style/sources/custom_geometry_source.cpp b/src/mbgl/style/sources/custom_geometry_source.cpp
index 44401c1a8f..9d3a58c151 100644
--- a/src/mbgl/style/sources/custom_geometry_source.cpp
+++ b/src/mbgl/style/sources/custom_geometry_source.cpp
@@ -14,7 +14,7 @@
namespace mbgl {
namespace style {
-CustomGeometrySource::CustomGeometrySource(std::string id, CustomGeometrySource::Options options)
+CustomGeometrySource::CustomGeometrySource(std::string id, const CustomGeometrySource::Options& options)
: Source(makeMutable<CustomGeometrySource::Impl>(std::move(id), options)),
loader(std::make_unique<Actor<CustomTileLoader>>(
Scheduler::GetBackground(), options.fetchTileFunction, options.cancelTileFunction)) {}
diff --git a/src/mbgl/style/sources/custom_geometry_source_impl.cpp b/src/mbgl/style/sources/custom_geometry_source_impl.cpp
index e456bd8719..184718fd76 100644
--- a/src/mbgl/style/sources/custom_geometry_source_impl.cpp
+++ b/src/mbgl/style/sources/custom_geometry_source_impl.cpp
@@ -4,13 +4,13 @@
namespace mbgl {
namespace style {
-CustomGeometrySource::Impl::Impl(std::string id_, CustomGeometrySource::Options options)
+CustomGeometrySource::Impl::Impl(std::string id_, const CustomGeometrySource::Options& options)
: Source::Impl(SourceType::CustomVector, std::move(id_)),
tileOptions(makeMutable<CustomGeometrySource::TileOptions>(options.tileOptions)),
zoomRange(options.zoomRange),
loaderRef({}) {}
-CustomGeometrySource::Impl::Impl(const Impl& impl, ActorRef<CustomTileLoader> loaderRef_)
+CustomGeometrySource::Impl::Impl(const Impl& impl, const ActorRef<CustomTileLoader>& loaderRef_)
: Source::Impl(impl), tileOptions(impl.tileOptions), zoomRange(impl.zoomRange), loaderRef(loaderRef_) {}
bool CustomGeometrySource::Impl::operator!=(const Impl& other) const noexcept {
diff --git a/src/mbgl/style/sources/custom_geometry_source_impl.hpp b/src/mbgl/style/sources/custom_geometry_source_impl.hpp
index 04e301f198..a441b38f69 100644
--- a/src/mbgl/style/sources/custom_geometry_source_impl.hpp
+++ b/src/mbgl/style/sources/custom_geometry_source_impl.hpp
@@ -10,8 +10,8 @@ namespace style {
class CustomGeometrySource::Impl : public Source::Impl {
public:
- Impl(std::string id, CustomGeometrySource::Options options);
- Impl(const Impl&, ActorRef<CustomTileLoader>);
+ Impl(std::string id, const CustomGeometrySource::Options& options);
+ Impl(const Impl&, const ActorRef<CustomTileLoader>&);
optional<std::string> getAttribution() const final;
diff --git a/src/mbgl/style/sources/geojson_source.cpp b/src/mbgl/style/sources/geojson_source.cpp
index 2880b9b131..d750d6b1d2 100644
--- a/src/mbgl/style/sources/geojson_source.cpp
+++ b/src/mbgl/style/sources/geojson_source.cpp
@@ -79,7 +79,7 @@ void GeoJSONSource::loadDescription(FileSource& fileSource) {
return;
}
- req = fileSource.request(Resource::source(*url), [this](Response res) {
+ req = fileSource.request(Resource::source(*url), [this](const Response& res) {
if (res.error) {
observer->onSourceError(
*this, std::make_exception_ptr(std::runtime_error(res.error->message)));
diff --git a/src/mbgl/style/sources/geojson_source_impl.cpp b/src/mbgl/style/sources/geojson_source_impl.cpp
index bb5445f02b..fb33eee8f9 100644
--- a/src/mbgl/style/sources/geojson_source_impl.cpp
+++ b/src/mbgl/style/sources/geojson_source_impl.cpp
@@ -80,7 +80,7 @@ T evaluateFeature(const mapbox::feature::feature<double>& f,
// static
std::shared_ptr<GeoJSONData> GeoJSONData::create(const GeoJSON& geoJSON,
- Immutable<GeoJSONOptions> options,
+ const Immutable<GeoJSONOptions>& options,
std::shared_ptr<Scheduler> scheduler) {
constexpr double scale = util::EXTENT / util::tileSize;
if (options->cluster && geoJSON.is<Features>() && !geoJSON.get<Features>().empty()) {
diff --git a/src/mbgl/style/sources/image_source.cpp b/src/mbgl/style/sources/image_source.cpp
index ec727a33bd..144d007cc5 100644
--- a/src/mbgl/style/sources/image_source.cpp
+++ b/src/mbgl/style/sources/image_source.cpp
@@ -64,7 +64,7 @@ void ImageSource::loadDescription(FileSource& fileSource) {
}
const Resource imageResource { Resource::Image, *url, {} };
- req = fileSource.request(imageResource, [this](Response res) {
+ req = fileSource.request(imageResource, [this](const Response& res) {
if (res.error) {
observer->onSourceError(*this, std::make_exception_ptr(std::runtime_error(res.error->message)));
} else if (res.notModified) {
diff --git a/src/mbgl/style/sources/raster_dem_source.cpp b/src/mbgl/style/sources/raster_dem_source.cpp
index dd859cc6d1..98a83ee870 100644
--- a/src/mbgl/style/sources/raster_dem_source.cpp
+++ b/src/mbgl/style/sources/raster_dem_source.cpp
@@ -6,13 +6,13 @@
#include <mbgl/style/sources/raster_source_impl.hpp>
#include <mbgl/tile/tile.hpp>
#include <mbgl/util/mapbox.hpp>
+#include <utility>
namespace mbgl {
namespace style {
RasterDEMSource::RasterDEMSource(std::string id, variant<std::string, Tileset> urlOrTileset_, uint16_t tileSize)
- : RasterSource(std::move(id), urlOrTileset_, tileSize, SourceType::RasterDEM){
-}
+ : RasterSource(std::move(id), std::move(urlOrTileset_), tileSize, SourceType::RasterDEM) {}
bool RasterDEMSource::supportsLayerType(const mbgl::style::LayerTypeInfo* info) const {
return mbgl::underlying_type(Tile::Kind::RasterDEM) == mbgl::underlying_type(info->tileKind);
diff --git a/src/mbgl/style/sources/raster_source.cpp b/src/mbgl/style/sources/raster_source.cpp
index 8c41da3a23..aa56f9570b 100644
--- a/src/mbgl/style/sources/raster_source.cpp
+++ b/src/mbgl/style/sources/raster_source.cpp
@@ -53,7 +53,7 @@ void RasterSource::loadDescription(FileSource& fileSource) {
}
const auto& url = urlOrTileset.get<std::string>();
- req = fileSource.request(Resource::source(url), [this, url](Response res) {
+ req = fileSource.request(Resource::source(url), [this, url](const Response& res) {
if (res.error) {
observer->onSourceError(*this, std::make_exception_ptr(std::runtime_error(res.error->message)));
} else if (res.notModified) {
diff --git a/src/mbgl/style/sources/vector_source.cpp b/src/mbgl/style/sources/vector_source.cpp
index cc2319b302..b482449fbf 100644
--- a/src/mbgl/style/sources/vector_source.cpp
+++ b/src/mbgl/style/sources/vector_source.cpp
@@ -52,7 +52,7 @@ void VectorSource::loadDescription(FileSource& fileSource) {
}
const auto& url = urlOrTileset.get<std::string>();
- req = fileSource.request(Resource::source(url), [this, url](Response res) {
+ req = fileSource.request(Resource::source(url), [this, url](const Response& res) {
if (res.error) {
observer->onSourceError(*this, std::make_exception_ptr(std::runtime_error(res.error->message)));
} else if (res.notModified) {