summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDane Springmeyer <dane@mapbox.com>2020-03-15 10:51:19 -0700
committerMikhail Pozdnyakov <mikhail.pozdnyakov@mapbox.com>2020-03-16 11:50:51 +0200
commit46a6932222eb3a5964007016ccd7e5b96a37432c (patch)
tree6aa236f22f6758304748ab0bcb2ffa24ed7b950b
parent9daaf2fe3a821ec13a297f3fbb4b5cd5ddc24c02 (diff)
downloadqtlocation-mapboxgl-46a6932222eb3a5964007016ccd7e5b96a37432c.tar.gz
start using tname variable
-rw-r--r--src/mbgl/style/conversion/source.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mbgl/style/conversion/source.cpp b/src/mbgl/style/conversion/source.cpp
index b4a3d74720..cf42b40489 100644
--- a/src/mbgl/style/conversion/source.cpp
+++ b/src/mbgl/style/conversion/source.cpp
@@ -196,16 +196,16 @@ optional<std::unique_ptr<Source>> Converter<std::unique_ptr<Source>>::operator()
error.message = "source type must be a string";
return nullopt;
}
- const std::string tname = *type;
- if (*type == "raster") {
+ const std::string& tname = type.value();
+ if (tname == "raster") {
return convertRasterSource(id, value, error);
- } else if (*type == "raster-dem") {
+ } else if (tname == "raster-dem") {
return convertRasterDEMSource(id, value, error);
- } else if (*type == "vector") {
+ } else if (tname == "vector") {
return convertVectorSource(id, value, error);
- } else if (*type == "geojson") {
+ } else if (tname == "geojson") {
return convertGeoJSONSource(id, value, error);
- } else if (*type == "image") {
+ } else if (tname == "image") {
return convertImageSource(id, value, error);
} else {
error.message = "invalid source type";