<div dir="ltr"><div>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.<br><br></div>Acked-by: Jason Ekstrand <<a href="mailto:jason@jlekstrand.net">jason@jlekstrand.net</a>><br><div><div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 15, 2017 at 7:10 AM, Lionel Landwerlin <span dir="ltr"><<a href="mailto:lionel.g.landwerlin@intel.com" target="_blank">lionel.g.landwerlin@intel.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Signed-off-by: Lionel Landwerlin <<a href="mailto:lionel.g.landwerlin@intel.com">lionel.g.landwerlin@intel.com</a><wbr>><br>
---<br>
src/vulkan/util/gen_enum_to_<wbr>str.py | 27 ++++++++++++++-------------<br>
1 file changed, 14 insertions(+), 13 deletions(-)<br>
<br>
diff --git a/src/vulkan/util/gen_enum_to_<wbr>str.py b/src/vulkan/util/gen_enum_to_<wbr>str.py<br>
index ef37972c20d..99ddd3cd1e6 100644<br>
--- a/src/vulkan/util/gen_enum_to_<wbr>str.py<br>
+++ b/src/vulkan/util/gen_enum_to_<wbr>str.py<br>
@@ -63,18 +63,19 @@ C_TEMPLATE = Template(textwrap.dedent(u"""\<br>
<br>
% for enum in enums:<br>
<br>
- const char *<br>
- vk_${<a href="http://enum.name" rel="noreferrer" target="_blank">enum.name</a>[2:]}_to_str(${<a href="http://enum.name" rel="noreferrer" target="_blank">e<wbr>num.name</a>} input)<br>
- {<br>
- switch(input) {<br>
- % for v in enum.values:<br>
- case ${v}:<br>
- return "${v}";<br>
- % endfor<br>
- default:<br>
- unreachable("Undefined enum value.");<br>
- }<br>
- }<br>
+ const char *<br>
+ vk_${<a href="http://enum.name" rel="noreferrer" target="_blank">enum.name</a>[2:]}_to_str(${<a href="http://enum.name" rel="noreferrer" target="_blank">e<wbr>num.name</a>} input)<br>
+ {<br>
+ switch(input) {<br>
+ % for v in enum.values:<br>
+ case ${v}:<br>
+ return "${v}";<br>
+ % endfor<br>
+ default:<br>
+ unreachable("Undefined enum value.");<br>
+ }<br>
+ }<br>
+<br>
%endfor"""),<br>
output_encoding='utf-8')<br>
<br>
@@ -91,7 +92,7 @@ H_TEMPLATE = Template(textwrap.dedent(u"""\<br>
#include <vulkan/vulkan.h><br>
<br>
% for enum in enums:<br>
- const char * vk_${<a href="http://enum.name" rel="noreferrer" target="_blank">enum.name</a>[2:]}_to_str(${<a href="http://enum.name" rel="noreferrer" target="_blank">e<wbr>num.name</a>} input);<br>
+ const char * vk_${<a href="http://enum.name" rel="noreferrer" target="_blank">enum.name</a>[2:]}_to_str(${<a href="http://enum.name" rel="noreferrer" target="_blank">e<wbr>num.name</a>} input);<br>
% endfor<br>
<br>
#endif"""),<br>
<span class="HOEnZb"><font color="#888888">--<br>
2.14.1<br>
<br>
______________________________<wbr>_________________<br>
mesa-dev mailing list<br>
<a href="mailto:mesa-dev@lists.freedesktop.org">mesa-dev@lists.freedesktop.org</a><br>
<a href="https://lists.freedesktop.org/mailman/listinfo/mesa-dev" rel="noreferrer" target="_blank">https://lists.freedesktop.org/<wbr>mailman/listinfo/mesa-dev</a><br>
</font></span></blockquote></div><br></div></div></div></div>