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

@@ -1,7 +1,6 @@
#include <mbgl/style/expression/formatted.hpp>
#include <mbgl/test/util.hpp>
#include <mbgl/util/optional.hpp>
using namespace mbgl;
using namespace mbgl::style::expression;
@@ -19,7 +18,7 @@ TEST(Formatted, Empty) {
Formatted emptyFormatted{""};
EXPECT_TRUE(emptyFormatted.empty());
auto emptyText = FormattedSection{"", nullopt, nullopt, nullopt};
auto emptyText = FormattedSection{"", std::nullopt, std::nullopt, std::nullopt};
auto emptyImage = FormattedSection{style::expression::Image()};
Formatted multipleEmptySections{std::vector<FormattedSection>{emptyText, emptyText, emptyText}};
EXPECT_TRUE(multipleEmptySections.empty());
@@ -27,7 +26,7 @@ TEST(Formatted, Empty) {
Formatted multipleEmptySectionsWithImage{std::vector<FormattedSection>{emptyText, emptyImage, emptyText}};
EXPECT_TRUE(multipleEmptySectionsWithImage.empty());
auto text = FormattedSection{"Formatted", nullopt, nullopt, nullopt};
auto text = FormattedSection{"Formatted", std::nullopt, std::nullopt, std::nullopt};
auto image = FormattedSection{style::expression::Image("Image")};
Formatted multipleSections{std::vector<FormattedSection>{emptyText, text, emptyText}};
@@ -41,7 +40,7 @@ TEST(Formatted, ToString) {
Formatted emptyFormatted{""};
EXPECT_EQ(emptyFormatted.toString(), "");
auto text = FormattedSection{"Formatted", nullopt, nullopt, nullopt};
auto text = FormattedSection{"Formatted", std::nullopt, std::nullopt, std::nullopt};
Formatted multipleSections{std::vector<FormattedSection>{text, text}};
EXPECT_EQ(multipleSections.toString(), "FormattedFormatted");