commit 67b9452fb87b101faa3c2ab8bbd5c1aea9ea67bd
parent 846a803ca91e2b734e15ab2c120704c97d865ea7
Author: Frederic Cambus <fred@statdns.com>
Date: Mon, 28 Sep 2020 12:26:46 +0200
Refactor writes to the pcboard_buffer array.
Diffstat:
1 file changed, 8 insertions(+), 6 deletions(-)
diff --git a/src/loaders/pcboard.c b/src/loaders/pcboard.c
@@ -107,12 +107,14 @@ ansilove_pcboard(struct ansilove_ctx *ctx, struct ansilove_options *options)
pcboard_buffer = ptr;
}
- /* write current character in pcbChar structure */
- pcboard_buffer[structIndex].column = column;
- pcboard_buffer[structIndex].row = row;
- pcboard_buffer[structIndex].background = pcb_colors[background];
- pcboard_buffer[structIndex].foreground = pcb_colors[foreground];
- pcboard_buffer[structIndex].character = *cursor;
+ /* write current character in pcbChar struct */
+ pcboard_buffer[structIndex] = (struct pcbChar) {
+ .column = column,
+ .row = row,
+ .background = pcb_colors[background],
+ .foreground = pcb_colors[foreground],
+ .character = *cursor
+ };
column++;
structIndex++;