commit f9c3f24ec3c40c706d7dd0e56daf52aaf2cb26e6
parent 68993c4cb960f3348fab2f0f5cc96c2e7764334a
Author: Frederic Cambus <fred@statdns.com>
Date: Tue, 17 Mar 2020 11:44:11 +0100
Remove a few useless parentheses.
Diffstat:
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/src/loaders/ansi.c b/src/loaders/ansi.c
@@ -473,11 +473,10 @@ ansilove_ansi(struct ansilove_ctx *ctx, struct ansilove_options *options)
columns = fmin(columnMax, options->columns);
/* create that damn thingy */
- if (!options->truecolor) {
+ if (!options->truecolor)
canvas = gdImageCreate(columns * options->bits, rowMax * fontData.height);
- } else {
+ else
canvas = gdImageCreateTrueColor(columns * options->bits, rowMax * fontData.height);
- }
if (!canvas) {
ctx->error = ANSILOVE_GD_ERROR;
@@ -496,19 +495,17 @@ ansilove_ansi(struct ansilove_ctx *ctx, struct ansilove_options *options)
} else if (workbench) {
gdImageFill(canvas, 0, 0, 0);
- for (int i = 0; i < 16; i++) {
+ for (int i = 0; i < 16; i++)
colors[i] = gdImageColorAllocate(canvas, workbench_palette[i*3],
workbench_palette[i*3+1],
workbench_palette[i*3+2]);
- }
} else {
/* Allocate standard ANSi color palette */
- for (int i = 0; i < 16; i++) {
+ for (int i = 0; i < 16; i++)
colors[i] = gdImageColorAllocate(canvas, ansi_palette[i*3],
ansi_palette[i*3+1],
ansi_palette[i*3+2]);
- }
}
/* render ANSi */