summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVito Caputo <vcaputo@pengaru.com>2023-11-14 22:01:05 -0800
committerVito Caputo <vcaputo@pengaru.com>2023-11-14 22:01:05 -0800
commitcf0905da52e8c1d8ac461b9b8cc817be48d5ec99 (patch)
tree7a8526568ce09a9251a315616bf7fe6e75c62d1f
parenta44c71ba3dcd57765b112c039b48513646c9e244 (diff)
modules/compose: trivial cleanups
Replace vestigial casted setup dereferences with already present local typed setup variable.
-rw-r--r--src/modules/compose/compose.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/modules/compose/compose.c b/src/modules/compose/compose.c
index 3e99049..b782ed5 100644
--- a/src/modules/compose/compose.c
+++ b/src/modules/compose/compose.c
@@ -72,17 +72,17 @@ static til_module_context_t * compose_create_context(const til_module_t *module,
for (size_t i = 0; i < s->n_layers; i++) {
const til_module_t *layer_module;
- layer_module = ((compose_setup_t *)setup)->layers[i].module_setup->creator;
+ layer_module = s->layers[i].module_setup->creator;
if (til_module_create_context(layer_module, stream, rand_r(&seed), ticks, n_cpus, s->layers[i].module_setup, &ctxt->layers[i].module_ctxt) < 0)
return til_module_context_free(&ctxt->til_module_context);
ctxt->n_layers++;
}
- if (((compose_setup_t *)setup)->texture.module_setup) {
+ if (s->texture.module_setup) {
const til_module_t *texture_module;
- texture_module = ((compose_setup_t *)setup)->texture.module_setup->creator;
+ texture_module = s->texture.module_setup->creator;
if (til_module_create_context(texture_module, stream, rand_r(&seed), ticks, n_cpus, s->texture.module_setup, &ctxt->texture.module_ctxt) < 0)
return til_module_context_free(&ctxt->til_module_context);
}
© All Rights Reserved