Rather than using a loop, and augmenting a variable use a generator and sum to achieve the same result.
Signed-off-by: Dylan Baker <[email protected]> --- src/mapi/glapi/gen/gl_x86_asm.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/src/mapi/glapi/gen/gl_x86_asm.py b/src/mapi/glapi/gen/gl_x86_asm.py index f2825cf..320d825 100644 --- a/src/mapi/glapi/gen/gl_x86_asm.py +++ b/src/mapi/glapi/gen/gl_x86_asm.py @@ -46,14 +46,8 @@ class PrintGenericStubs(gl_XML.gl_print_base): "BRIAN PAUL, IBM") def get_stack_size(self, f): - size = 0 - for p in f.parameterIterator(): - if p.is_padding: - continue - - size += p.get_stack_size() - - return size + return sum(p.get_stack_size() for p in f.parameterIterator() + if not p.is_padding) def printRealHeader(self): print '#include "x86/assyntax.h"' -- 2.8.0 _______________________________________________ mesa-dev mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/mesa-dev
