[Mesa-dev] [PATCH 02/15] vulkan: enum generator: align function declarations/prototypes
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Fri Sep 15 14:10:54 UTC 2017
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
More information about the mesa-dev
mailing list