Use std::optional instead of mbgl::optional (#911)
This commit is contained in:
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user