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

@@ -16,6 +16,7 @@
#include <mbgl/util/run_loop.hpp>
#include <sstream>
#include <optional>
using namespace mbgl;
@@ -34,7 +35,7 @@ public:
util::RunLoop loop;
};
void prepare(Map& map, optional<std::string> json = nullopt) {
void prepare(Map& map, std::optional<std::string> json = std::nullopt) {
map.getStyle().loadJSON(json ? *json : util::read_file("benchmark/fixtures/api/style.json"));
map.jumpTo(CameraOptions().withCenter(LatLng { 40.726989, -73.992857 }).withZoom(15.0)); // Manhattan
@@ -42,7 +43,7 @@ void prepare(Map& map, optional<std::string> json = nullopt) {
map.getStyle().addImage(std::make_unique<style::Image>("test-icon", std::move(image), 1.0f));
}
void prepare_map2(Map& map, optional<std::string> json = nullopt) {
void prepare_map2(Map& map, std::optional<std::string> json = std::nullopt) {
map.getStyle().loadJSON(json ? *json : util::read_file("benchmark/fixtures/api/style.json"));
map.jumpTo(CameraOptions().withCenter(LatLng{41.379800, 2.176810}).withZoom(15.0)); // Barcelona