scripts: PR1314, Remove trailing whitespace/newlines
Change-Id: I41f7703540af202b94ebd78ec03b282abb321e35
diff --git a/scripts/dispatch_table_generator.py b/scripts/dispatch_table_generator.py
index b95ffd7..09b9f01 100644
--- a/scripts/dispatch_table_generator.py
+++ b/scripts/dispatch_table_generator.py
@@ -127,6 +127,7 @@
instance_table += self.OutputDispatchTable('instance')
write(device_table, file=self.outFile);
+ write("\n", file=self.outFile)
write(instance_table, file=self.outFile);
# Finish processing in superclass
@@ -192,5 +193,5 @@
table += ' table->%s = (PFN_%s) gpa(%s, "%s");\n' % (base_name, item[0], table_type, item[0])
if item[1] is not None:
table += '#endif // %s\n' % item[1]
- table += '}\n\n'
+ table += '}'
return table
diff --git a/scripts/vk_helper.py b/scripts/vk_helper.py
index b2fe062..85dd395 100755
--- a/scripts/vk_helper.py
+++ b/scripts/vk_helper.py
@@ -995,9 +995,9 @@
init_list = init_list[:-1] # hack off final comma
if s in custom_construct_txt:
construct_txt = custom_construct_txt[s]
- ss_src.append("\n%s::%s(const %s* pInStruct) : %s\n{\n%s}" % (ss_name, ss_name, s, init_list, construct_txt))
+ ss_src.append("\n%s::%s(const %s* pInStruct) :%s\n{\n%s}" % (ss_name, ss_name, s, init_list, construct_txt))
if '' != default_init_list:
- default_init_list = " : %s" % (default_init_list[:-1])
+ default_init_list = " :%s" % (default_init_list[:-1])
ss_src.append("\n%s::%s()%s\n{}" % (ss_name, ss_name, default_init_list))
# Create slight variation of init and construct txt for copy constructor that takes a src object reference vs. struct ptr
copy_construct_init = init_func_txt.replace('pInStruct->', 'src.')
@@ -1040,6 +1040,9 @@
if (self.ev_dict[e]['unique']):
body.append(' case %s:\n return "%s";' % (e, e))
body.append(' default:\n return "Unhandled %s";\n }\n}\n\n' % (fet))
+ if len(body) > 0 and body[-1].endswith("\n\n"):
+ # strip extra newline from end
+ body[-1] = body[-1][:-1]
return "\n".join(body)
def _generateSHHeader(self):