diff options
author | Konstantin Käfer <mail@kkaefer.com> | 2014-03-12 12:42:51 +0100 |
---|---|---|
committer | Konstantin Käfer <mail@kkaefer.com> | 2014-03-12 12:43:18 +0100 |
commit | 72ac0c9c317f3908a342e54f78c9edf270fbd6ce (patch) | |
tree | e0fe25c1de4fcf879ff2b3d09f4f1772e2f95d5d /include | |
parent | b3e9a1b42c33a23d8951860db37648624cf88d6c (diff) | |
download | qtlocation-mapboxgl-72ac0c9c317f3908a342e54f78c9edf270fbd6ce.tar.gz |
use external library
Diffstat (limited to 'include')
-rw-r--r-- | include/csscolorparser/csscolorparser.hpp (renamed from include/llmr/util/color.hpp) | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/include/llmr/util/color.hpp b/include/csscolorparser/csscolorparser.hpp index 4f5814dccd..1d074627f6 100644 --- a/include/llmr/util/color.hpp +++ b/include/csscolorparser/csscolorparser.hpp @@ -1,7 +1,8 @@ // (c) Dean McNamee <dean@gmail.com>, 2012. -// C++ port by Konstantin Käfer <mail@kkaefer.com, 2014. +// C++ port by Konstantin Käfer <mail@kkaefer.com>, 2014. // // https://github.com/deanm/css-color-parser-js +// https://github.com/kkaefer/css-color-parser-cpp // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to @@ -20,26 +21,24 @@ // LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS // IN THE SOFTWARE. -#ifndef LLMR_UTIL_COLOR -#define LLMR_UTIL_COLOR + +#ifndef CSS_COLOR_PARSER_CPP +#define CSS_COLOR_PARSER_CPP #include <string> -namespace llmr { -namespace util { +namespace CSSColorParser { -struct CSSColor { - inline CSSColor() {} - inline CSSColor(unsigned char r, unsigned char g, unsigned char b, float a) +struct Color { + inline Color() {} + inline Color(unsigned char r, unsigned char g, unsigned char b, float a) : r(r), g(g), b(b), a(a) {} unsigned char r = 0, g = 0, b = 0; float a = 1.0f; }; -CSSColor parseCSSColor(std::string str); +Color parse(const std::string& css_str); } -} #endif - |