mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-11-07 21:50:08 +01:00
Global: marks ffGenerate*JsonConfig as [[gnu::cold]]
This commit is contained in:
@@ -417,6 +417,7 @@ static const char* printJsonConfig(FFdata* data, bool prepare) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
[[gnu::cold]]
|
||||
void ffPrintJsonConfig(FFdata* data, bool prepare) {
|
||||
yyjson_mut_doc* jsonDoc = data->resultDoc;
|
||||
const char* error = printJsonConfig(data, prepare);
|
||||
|
||||
@@ -285,6 +285,7 @@ bool ffPercentParseJsonObject(yyjson_val* key, yyjson_val* value, FFPercentageMo
|
||||
return true;
|
||||
}
|
||||
|
||||
[[gnu::cold]]
|
||||
void ffPercentGenerateJsonConfig(yyjson_mut_doc* doc, yyjson_mut_val* module, FFPercentageModuleConfig config) {
|
||||
yyjson_mut_val* percent = yyjson_mut_obj_add_obj(doc, module, "percent");
|
||||
yyjson_mut_obj_add_uint(doc, percent, "green", config.green);
|
||||
|
||||
@@ -154,6 +154,7 @@ bool ffTempsParseJsonObject(yyjson_val* key, yyjson_val* value, bool* useTemp, F
|
||||
return true;
|
||||
}
|
||||
|
||||
[[gnu::cold]]
|
||||
void ffTempsGenerateJsonConfig(yyjson_mut_doc* doc, yyjson_mut_val* module, bool temp, FFColorRangeConfig config) {
|
||||
if (!temp) {
|
||||
yyjson_mut_obj_add_bool(doc, module, "temp", false);
|
||||
|
||||
Reference in New Issue
Block a user