aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src
diff options
context:
space:
mode:
authorJP Appel <jeanpierre.appel01@gmail.com>2024-04-20 18:41:45 -0400
committerJP Appel <jeanpierre.appel01@gmail.com>2024-04-20 18:41:45 -0400
commitd367b424d5ad862b6191270c9190aff261d1e581 (patch)
tree493a2c6f74b72ff60d150681e50edc93f436fb4b /src
parentaf5c7314b9c27f93047fbc0ce130e1ae2043be72 (diff)
refactored colors initializer
Diffstat (limited to 'src')
-rw-r--r--src/plotting.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/plotting.c b/src/plotting.c
index 5b5565e..7fb57a8 100644
--- a/src/plotting.c
+++ b/src/plotting.c
@@ -58,12 +58,14 @@ colors_t* create_colors(const size_t x, const size_t y){
return NULL;
}
- colors->x = x;
- colors->y = y;
- colors->size = x*y;
- colors->red = red;
- colors->green = green;
- colors->blue = blue;
+ *colors = (colors_t){
+ .x = x,
+ .y = y,
+ .size = x*y,
+ .red = red,
+ .green = green,
+ .blue = blue
+ };
return colors;
}