start using tname variable
This commit is contained in:
committed by
Mikhail Pozdnyakov
parent
9daaf2fe3a
commit
46a6932222
@@ -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";
|
||||
|
||||
Reference in New Issue
Block a user