[Mesa-dev] [PATCH 02/15] vulkan: enum generator: align function declarations/prototypes
Jason Ekstrand
jason at jlekstrand.net
Fri Sep 15 21:24:31 UTC 2017
I don't know if this really makes things any better or worse. TBH, I'd
kind-of like to get rid of the dedent entirely and just have the C fully
left-aligned. In any case, this is fine.
Acked-by: Jason Ekstrand <jason at jlekstrand.net>
On Fri, Sep 15, 2017 at 7:10 AM, Lionel Landwerlin <
lionel.g.landwerlin at intel.com> wrote:
> Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
> ---
> src/vulkan/util/gen_enum_to_str.py | 27 ++++++++++++++-------------
> 1 file changed, 14 insertions(+), 13 deletions(-)
>
> diff --git a/src/vulkan/util/gen_enum_to_str.py
> b/src/vulkan/util/gen_enum_to_str.py
> index ef37972c20d..99ddd3cd1e6 100644
> --- a/src/vulkan/util/gen_enum_to_str.py
> +++ b/src/vulkan/util/gen_enum_to_str.py
> @@ -63,18 +63,19 @@ C_TEMPLATE = Template(textwrap.dedent(u"""\
>
> % for enum in enums:
>
> - const char *
> - vk_${enum.name[2:]}_to_str(${enum.name} input)
> - {
> - switch(input) {
> - % for v in enum.values:
> - case ${v}:
> - return "${v}";
> - % endfor
> - default:
> - unreachable("Undefined enum value.");
> - }
> - }
> + const char *
> + vk_${enum.name[2:]}_to_str(${enum.name} input)
> + {
> + switch(input) {
> + % for v in enum.values:
> + case ${v}:
> + return "${v}";
> + % endfor
> + default:
> + unreachable("Undefined enum value.");
> + }
> + }
> +
> %endfor"""),
> output_encoding='utf-8')
>
> @@ -91,7 +92,7 @@ H_TEMPLATE = Template(textwrap.dedent(u"""\
> #include <vulkan/vulkan.h>
>
> % for enum in enums:
> - const char * vk_${enum.name[2:]}_to_str(${enum.name} input);
> + const char * vk_${enum.name[2:]}_to_str(${enum.name} input);
> % endfor
>
> #endif"""),
> --
> 2.14.1
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170915/99c0a3e4/attachment-0001.html>
More information about the mesa-dev
mailing list