Use C++17 <optional> in csscolorparser (#2071)
This commit is contained in:
2
vendor/csscolorparser/csscolorparser.cpp
vendored
2
vendor/csscolorparser/csscolorparser.cpp
vendored
@@ -176,7 +176,7 @@ std::vector<std::string> split(const std::string& s, char delim) {
|
||||
return elems;
|
||||
}
|
||||
|
||||
std::experimental::optional<Color> parse(const std::string& css_str) {
|
||||
std::optional<Color> parse(const std::string& css_str) {
|
||||
std::string str = css_str;
|
||||
|
||||
// Remove all whitespace, not compliant, but should just be more accepting.
|
||||
|
||||
@@ -25,8 +25,7 @@
|
||||
#ifndef CSS_COLOR_PARSER_CPP
|
||||
#define CSS_COLOR_PARSER_CPP
|
||||
|
||||
#include <optional.hpp>
|
||||
|
||||
#include <optional>
|
||||
#include <string>
|
||||
#include <cmath>
|
||||
|
||||
@@ -50,7 +49,7 @@ inline bool operator!=(const Color& lhs, const Color& rhs) {
|
||||
return !(lhs == rhs);
|
||||
}
|
||||
|
||||
std::experimental::optional<Color> parse(const std::string& css_str);
|
||||
std::optional<Color> parse(const std::string& css_str);
|
||||
|
||||
} // namespace CSSColorParser
|
||||
|
||||
|
||||
Reference in New Issue
Block a user