Local string.

This commit is contained in:
2025-08-11 02:46:49 -04:00
parent accecfca20
commit 2394e7d9f7

View File

@ -1074,11 +1074,11 @@ void StyleEngine::init () {
} }
void StyleEngine::buildUserStyle () { void StyleEngine::buildUserStyle () {
char *filename = dStrconcat(dGethomedir(), "/.flenser/style.css", NULL); using namespace std::literals::string_literals;
std::string filename = dGethomedir() + "/.flenser/style.css"s;
const std::string style= a_Misc_file2dstr(filename); const std::string style= a_Misc_file2dstr(filename.c_str());
if (not style.empty()) { if (not style.empty()) {
CssParser::parse (NULL,NULL,cssContext, style.c_str(), style.size(), CSS_ORIGIN_USER); CssParser::parse (NULL,NULL,cssContext, style.c_str(), style.size(), CSS_ORIGIN_USER);
} }
dFree (filename);
} }