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

@@ -758,7 +758,7 @@ TEST(Map, DisabledSources) {
MapTest<> test;
// Always load the same image tile for raster layers.
test.fileSource->response = [] (const Resource& res) -> optional<Response> {
test.fileSource->response = [] (const Resource& res) -> std::optional<Response> {
if (res.url == "asset://tile.png") {
Response response;
response.data = std::make_shared<std::string>(
@@ -1245,8 +1245,8 @@ TEST(Map, PrefetchDeltaOverride) {
}
};
test.map.getStyle().getSource("vector")->setPrefetchZoomDelta(nullopt);
test.map.getStyle().getSource("custom")->setPrefetchZoomDelta(nullopt);
test.map.getStyle().getSource("vector")->setPrefetchZoomDelta(std::nullopt);
test.map.getStyle().getSource("custom")->setPrefetchZoomDelta(std::nullopt);
test.runLoop.run();
// Each source requests 4 additional parent tiles.

View File

@@ -40,7 +40,7 @@ TEST(Map, PrefetchTiles) {
std::vector<int> tiles;
fileSource->response = [&] (const Resource& res) -> optional<Response> {
fileSource->response = [&] (const Resource& res) -> std::optional<Response> {
static std::string tile = util::read_file("test/fixtures/map/prefetch/tile.png");
auto zoom = std::stoi(res.url);