diff options
author | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-03-27 18:30:35 +0200 |
---|---|---|
committer | Thiago Marcos P. Santos <tmpsantos@gmail.com> | 2020-03-30 23:37:44 +0300 |
commit | 7f422e869625f0606faefd36f9cec9b664fdf595 (patch) | |
tree | cfc5bd82f7de6f0ca8e88546fe77d69f76619281 /src | |
parent | 2280a8a752c9f86dc4b94130bd4d8337ec7172c8 (diff) | |
download | qtlocation-mapboxgl-7f422e869625f0606faefd36f9cec9b664fdf595.tar.gz |
[core] Fix google-build-explicit-make-pair errors
As reported by clang-tidy-8.
Diffstat (limited to 'src')
-rw-r--r-- | src/mbgl/style/layer.cpp | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mbgl/style/layer.cpp b/src/mbgl/style/layer.cpp index 5f682873b6..d6a855fd64 100644 --- a/src/mbgl/style/layer.cpp +++ b/src/mbgl/style/layer.cpp @@ -94,33 +94,33 @@ void Layer::setMaxZoom(float maxZoom) { Value Layer::serialize() const { mapbox::base::ValueObject result; - result.emplace(std::make_pair<std::string, Value>("id", getID())); - result.emplace(std::make_pair<std::string, Value>("type", Layer::getTypeInfo()->type)); + result.emplace(std::make_pair("id", getID())); + result.emplace(std::make_pair("type", Layer::getTypeInfo()->type)); auto source = getSourceID(); if (!source.empty()) { - result.emplace(std::make_pair<std::string, Value>("source", std::move(source))); + result.emplace(std::make_pair("source", std::move(source))); } auto sourceLayer = getSourceLayer(); if (!sourceLayer.empty()) { - result.emplace(std::make_pair<std::string, Value>("source-layer", std::move(sourceLayer))); + result.emplace(std::make_pair("source-layer", std::move(sourceLayer))); } if (getFilter()) { - result.emplace(std::make_pair<std::string, Value>("filter", getFilter().serialize())); + result.emplace(std::make_pair("filter", getFilter().serialize())); } if (getMinZoom() != -std::numeric_limits<float>::infinity()) { - result.emplace(std::make_pair<std::string, Value>("minzoom", getMinZoom())); + result.emplace(std::make_pair("minzoom", getMinZoom())); } if (getMaxZoom() != std::numeric_limits<float>::infinity()) { - result.emplace(std::make_pair<std::string, Value>("maxzoom", getMaxZoom())); + result.emplace(std::make_pair("maxzoom", getMaxZoom())); } if (getVisibility() == VisibilityType::None) { - result["layout"] = mapbox::base::ValueObject{std::make_pair<std::string, Value>("visibility", "none")}; + result["layout"] = mapbox::base::ValueObject{std::make_pair("visibility", "none")}; } return result; @@ -131,7 +131,7 @@ void Layer::serializeProperty(Value& out, const StyleProperty& property, const c auto& object = *(out.getObject()); std::string propertyType = isPaint ? "paint" : "layout"; auto it = object.find(propertyType); - auto pair = std::make_pair<std::string, Value>(std::string(propertyName), Value{property.getValue()}); + auto pair = std::make_pair(std::string(propertyName), Value{property.getValue()}); if (it != object.end()) { assert(it->second.getObject()); it->second.getObject()->emplace(std::move(pair)); |