Use std::optional instead of mbgl::optional (#911)

This commit is contained in:
Bart Louwers
2023-03-17 12:51:59 +01:00
committed by GitHub
parent 36846439c6
commit 15ad65dd3d
482 changed files with 2605 additions and 2652 deletions

View File

@@ -22,9 +22,9 @@ FeatureType VectorTileFeature::getType() const {
}
}
optional<Value> VectorTileFeature::getValue(const std::string& key) const {
const optional<Value> value(feature.getValue(key));
return value->is<NullValue>() ? nullopt : value;
std::optional<Value> VectorTileFeature::getValue(const std::string& key) const {
const std::optional<Value> value(feature.getValue(key));
return value->is<NullValue>() ? std::nullopt : value;
}
const PropertyMap& VectorTileFeature::getProperties() const {
@@ -46,7 +46,7 @@ const GeometryCollection& VectorTileFeature::getGeometries() const {
lines = feature.getGeometries<GeometryCollection>(scale);
}
catch(const std::runtime_error& ex) {
Log::Error(Event::ParseTile, "Could not get geometries: %s", ex.what());
Log::Error(Event::ParseTile, "Could not get geometries: " + std::string(ex.what()));
lines = GeometryCollection();
}