struct-ft.j2: use a single line for array indices
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 8 Sep 2020 20:15:31 +0000 (16:15 -0400)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Tue, 8 Sep 2020 20:15:31 +0000 (16:15 -0400)
Still readable and less weird in my opinion.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
barectf/templates/metadata/struct-ft.j2

index f75e4285ca9f795f5a052cdd55abd1dd0851a698..50de1df2eeb4a3827f405e00d4c4f51a63b7174f 100644 (file)
@@ -30,8 +30,6 @@ struct {
         #}
        {% set chain = ft_chain(member.field_type) %}
        {{ chain[-1] | ft_str | indent_tab }} {{ name }}
-       {%- for array_ft in chain[:-1] -%}
-               [{{ array_ft.length }}]
-       {%- endfor %};
+       {%- for array_ft in chain[:-1] %}[{{ array_ft.length }}]{% endfor %};
 {% endfor %}
 } align({{ ft.minimum_alignment }})
This page took 0.02343 seconds and 4 git commands to generate.