fix: fix compile/run bugs from trying to be safer. rip

This commit is contained in:
Keepo
2026-03-28 23:26:34 -04:00
parent 3533265675
commit 72d6a51fb7
3 changed files with 2 additions and 3 deletions

View File

@@ -7,4 +7,4 @@
* 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);

View File

@@ -186,7 +186,6 @@ src_files = files(
'src/util/icon_loader.cpp',
'src/util/regex_collection.cpp',
'src/util/css_reload_helper.cpp',
'src/util/has_8bit_hex.cpp',
'src/util/transform_8bit_to_rgba.cpp'
)

View File

@@ -25,7 +25,7 @@ TransformResult transform_8bit_to_hex(const std::string& file_path) {
f.read(result.data(), size);
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;
auto it = std::sregex_iterator(result.begin(), result.end(), pattern);