diff options
author | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-07-29 11:18:57 +0300 |
---|---|---|
committer | Bruno de Oliveira Abinader <bruno@mapbox.com> | 2019-07-29 18:36:08 +0300 |
commit | 6f0cda8c8b8e7831f04ae5e00b13387107dcad9b (patch) | |
tree | 985607080970868ae8204cb5ef6a37b0d75bdcfc /src | |
parent | 41e30343f7c9772ba0a3dfa1497dd5657b18aca1 (diff) | |
download | qtlocation-mapboxgl-6f0cda8c8b8e7831f04ae5e00b13387107dcad9b.tar.gz |
[build] Use mapbox-base optional
Diffstat (limited to 'src')
-rw-r--r-- | src/csscolorparser/csscolorparser.cpp | 2 | ||||
-rw-r--r-- | src/csscolorparser/csscolorparser.hpp | 8 |
2 files changed, 4 insertions, 6 deletions
diff --git a/src/csscolorparser/csscolorparser.cpp b/src/csscolorparser/csscolorparser.cpp index 106dae6cef..0de921b265 100644 --- a/src/csscolorparser/csscolorparser.cpp +++ b/src/csscolorparser/csscolorparser.cpp @@ -176,7 +176,7 @@ std::vector<std::string> split(const std::string& s, char delim) { return elems; } -optional<Color> parse(const std::string& css_str) { +mbgl::optional<Color> parse(const std::string& css_str) { std::string str = css_str; // Remove all whitespace, not compliant, but should just be more accepting. diff --git a/src/csscolorparser/csscolorparser.hpp b/src/csscolorparser/csscolorparser.hpp index b6bc5570f9..88b916620e 100644 --- a/src/csscolorparser/csscolorparser.hpp +++ b/src/csscolorparser/csscolorparser.hpp @@ -25,15 +25,13 @@ #ifndef CSS_COLOR_PARSER_CPP #define CSS_COLOR_PARSER_CPP +#include <mbgl/util/optional.hpp> + #include <string> #include <cmath> -#include <optional.hpp> namespace CSSColorParser { -template <class T> -using optional = std::experimental::optional<T>; - struct Color { inline Color() { } @@ -52,7 +50,7 @@ inline bool operator!=(const Color& lhs, const Color& rhs) { return !(lhs == rhs); } -optional<Color> parse(const std::string& css_str); +mbgl::optional<Color> parse(const std::string& css_str); } // namespace CSSColorParser |