fix: fix compile/run bugs from trying to be safer. rip
This commit is contained in:
@@ -7,4 +7,4 @@
|
|||||||
* and transforms them into GTK-compatible rgba() syntax.
|
* and transforms them into GTK-compatible rgba() syntax.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
std::string transform_8bit_to_hex(const std::string& file_path);
|
std::pair<std::string, bool> transform_8bit_to_hex(const std::string& file_path);
|
||||||
|
|||||||
@@ -186,7 +186,6 @@ src_files = files(
|
|||||||
'src/util/icon_loader.cpp',
|
'src/util/icon_loader.cpp',
|
||||||
'src/util/regex_collection.cpp',
|
'src/util/regex_collection.cpp',
|
||||||
'src/util/css_reload_helper.cpp',
|
'src/util/css_reload_helper.cpp',
|
||||||
'src/util/has_8bit_hex.cpp',
|
|
||||||
'src/util/transform_8bit_to_rgba.cpp'
|
'src/util/transform_8bit_to_rgba.cpp'
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ TransformResult transform_8bit_to_hex(const std::string& file_path) {
|
|||||||
f.read(result.data(), size);
|
f.read(result.data(), size);
|
||||||
|
|
||||||
static std::regex pattern(
|
static std::regex pattern(
|
||||||
R"((\#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})))");
|
R"(\#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2}))");
|
||||||
std::string final_output;
|
std::string final_output;
|
||||||
|
|
||||||
auto it = std::sregex_iterator(result.begin(), result.end(), pattern);
|
auto it = std::sregex_iterator(result.begin(), result.end(), pattern);
|
||||||
|
|||||||
Reference in New Issue
Block a user