codegen: Optimize code indentation and avoid a loop

Signed-off-by: Frediano Ziglio <fziglio@redhat.com>
This commit is contained in:
Frediano Ziglio 2015-07-21 17:45:34 +01:00 committed by Christophe Fergeau
parent 233c463e34
commit 553be71067

View File

@ -130,8 +130,7 @@ class CodeWriter:
return
if self.at_line_start:
for i in range(self.indentation):
self.out.write(u" ")
self.out.write(u" " * self.indentation)
self.at_line_start = False
self.out.write(s)
return self