Globals: use generic selection when passing format args

This commit is contained in:
李通洲
2024-09-03 14:52:40 +08:00
parent c39df1ae7b
commit 37cc2c9c1b
67 changed files with 488 additions and 469 deletions
+4 -4
View File
@@ -61,10 +61,10 @@ void ffPrintMemory(FFMemoryOptions* options)
FF_STRBUF_AUTO_DESTROY percentageBar = ffStrbufCreate();
ffPercentAppendBar(&percentageBar, percentage, options->percent, &options->moduleArgs);
FF_PRINT_FORMAT_CHECKED(FF_MEMORY_MODULE_NAME, 0, &options->moduleArgs, FF_PRINT_TYPE_DEFAULT, FF_MEMORY_NUM_FORMAT_ARGS, ((FFformatarg[]){
{FF_FORMAT_ARG_TYPE_STRBUF, &usedPretty, "used"},
{FF_FORMAT_ARG_TYPE_STRBUF, &totalPretty, "total"},
{FF_FORMAT_ARG_TYPE_STRBUF, &percentageNum, "percentage"},
{FF_FORMAT_ARG_TYPE_STRBUF, &percentageBar, "percentage-bar"},
FF_FORMAT_ARG(usedPretty, "used"),
FF_FORMAT_ARG(totalPretty, "total"),
FF_FORMAT_ARG(percentageNum, "percentage"),
FF_FORMAT_ARG(percentageBar, "percentage-bar"),
}));
}
}