comparison Framework/Toolbox/GenericToolbox.cpp @ 1101:141593f1aa88

fix build on ubuntu
author Sebastien Jodogne <s.jodogne@gmail.com>
date Sat, 26 Oct 2019 11:35:41 +0200
parents 287ec78f63b4
children 2d8ab34c8c91
comparison
equal deleted inserted replaced
1094:dead648f8ff1 1101:141593f1aa88
27 { 27 {
28 namespace GenericToolbox 28 namespace GenericToolbox
29 { 29 {
30 bool GetRgbaValuesFromString(uint8_t& red, uint8_t& green, uint8_t& blue, uint8_t& alpha, const char* text) 30 bool GetRgbaValuesFromString(uint8_t& red, uint8_t& green, uint8_t& blue, uint8_t& alpha, const char* text)
31 { 31 {
32 boost::regex pattern(R"bgo(\s*rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)\s*)bgo"); 32 boost::regex pattern("\\s*rgb\\s*\\(\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*\\)\\s*");
33 33
34 boost::cmatch what; 34 boost::cmatch what;
35 35
36 if (boost::regex_match(text, what, pattern)) 36 if (boost::regex_match(text, what, pattern))
37 { 37 {
66 return false; 66 return false;
67 } 67 }
68 } 68 }
69 bool GetRgbValuesFromString(uint8_t& red, uint8_t& green, uint8_t& blue, const char* text) 69 bool GetRgbValuesFromString(uint8_t& red, uint8_t& green, uint8_t& blue, const char* text)
70 { 70 {
71 boost::regex pattern(R"bgo(\s*rgb\s*\(\s*([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\s*\)\s*)bgo"); 71 boost::regex pattern("\\s*rgb\\s*\\(\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*,\\s*([0-9]+)\\s*\\)\\s*");
72 72
73 boost::cmatch what; 73 boost::cmatch what;
74 74
75 if (boost::regex_match(text, what, pattern)) 75 if (boost::regex_match(text, what, pattern))
76 { 76 {