Skip to content

Commit 8334035

Browse files
committed
Logo: small optimizations
1 parent 1ee8528 commit 8334035

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

src/logo/logo.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -287,11 +287,11 @@ void ffLogoPrintChars(const char* data, bool doColorReplacement) {
287287

288288
static void logoApplyColors(const FFlogo* logo, bool replacement) {
289289
if (instance.config.display.colorTitle.length == 0) {
290-
ffStrbufAppendS(&instance.config.display.colorTitle, logo->colorTitle ?: logo->colors[0]);
290+
ffStrbufSetStatic(&instance.config.display.colorTitle, logo->colorTitle ?: logo->colors[0]);
291291
}
292292

293293
if (instance.config.display.colorKeys.length == 0) {
294-
ffStrbufAppendS(&instance.config.display.colorKeys, logo->colorKeys ?: logo->colors[1]);
294+
ffStrbufSetStatic(&instance.config.display.colorKeys, logo->colorKeys ?: logo->colors[1]);
295295
}
296296

297297
if (replacement) {
@@ -300,7 +300,7 @@ static void logoApplyColors(const FFlogo* logo, bool replacement) {
300300
const char* const* colors = logo->colors;
301301
for (int i = 0; *colors != nullptr && i < FASTFETCH_LOGO_MAX_COLORS; i++, colors++) {
302302
if (options->colors[i].length == 0) {
303-
ffStrbufAppendS(&options->colors[i], *colors);
303+
ffStrbufSetStatic(&options->colors[i], *colors);
304304
}
305305
}
306306
}

0 commit comments

Comments
 (0)