diff options
author | Dylan Baker <baker.dylan.c@gmail.com> | 2016-03-29 10:30:53 -0700 |
---|---|---|
committer | Dylan Baker <baker.dylan.c@gmail.com> | 2016-03-31 15:52:22 -0700 |
commit | 010fa5efcb8b9b9b9a50e6ac7eabf015fd3739d2 (patch) | |
tree | 6cb9619ce48280e13b3551a971144770d400a45d | |
parent | 0e66448334c88db352767df35f4335073b40ac06 (diff) |
glapi: remove useless 0 start parameter for (x)range
Python's range and xrange functions start at 0 by default anyway, so
don't bother setting it explicitly to 0.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
-rw-r--r-- | src/mapi/glapi/gen/glX_proto_size.py | 2 | ||||
-rw-r--r-- | src/mapi/glapi/gen/glX_server_table.py | 4 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_XML.py | 10 | ||||
-rw-r--r-- | src/mapi/glapi/gen/gl_gentable.py | 4 |
4 files changed, 10 insertions, 10 deletions
diff --git a/src/mapi/glapi/gen/glX_proto_size.py b/src/mapi/glapi/gen/glX_proto_size.py index 0c0b10689c..46ac61ef87 100644 --- a/src/mapi/glapi/gen/glX_proto_size.py +++ b/src/mapi/glapi/gen/glX_proto_size.py @@ -151,7 +151,7 @@ class glx_enum_function(object): masked_enums = {} masked_count = {} - for i in xrange(0, mask + 1): + for i in xrange(mask + 1): masked_enums[i] = "0" masked_count[i] = 0 diff --git a/src/mapi/glapi/gen/glX_server_table.py b/src/mapi/glapi/gen/glX_server_table.py index 6443a99ddf..e67ff702ee 100644 --- a/src/mapi/glapi/gen/glX_server_table.py +++ b/src/mapi/glapi/gen/glX_server_table.py @@ -35,7 +35,7 @@ import license def log2(value): - for i in xrange(0, 30): + for i in xrange(30): p = 1 << i if p >= value: return i @@ -95,7 +95,7 @@ class function_table: next_opcode = min_opcode + (1 << remaining_bits) empty_children = 0 - for M in xrange(0, remaining_bits): + for M in xrange(remaining_bits): op_count = 1 << (remaining_bits - M) child_count = 1 << M diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py index 695ef7f07b..f1606a6cfa 100644 --- a/src/mapi/glapi/gen/gl_XML.py +++ b/src/mapi/glapi/gen/gl_XML.py @@ -685,7 +685,7 @@ class gl_function(gl_item): if len(parameters) != len(self.parameters): raise RuntimeError("Parameter count mismatch in %s. Was %d, now %d." % (name, len(self.parameters), len(parameters))) - for j in xrange(0, len(parameters)): + for j in xrange(len(parameters)): p1 = parameters[j] p2 = self.parameters[j] if not p1.compatible(p2): @@ -924,7 +924,7 @@ class gl_api(object): functions = [] - for func_cat_type in range(0,4): + for func_cat_type in range(4): keys = lists[func_cat_type].keys() keys.sort() @@ -943,13 +943,13 @@ class gl_api(object): if func.offset > max_offset: max_offset = func.offset - temp = [None for i in range(0, max_offset + 1)] + temp = [None for i in range(max_offset + 1)] for func in self.functions_by_name.itervalues(): if func.offset != -1: temp[func.offset] = func list = [] - for i in range(0, max_offset + 1): + for i in range(max_offset + 1): if temp[i]: list.append(temp[i]) @@ -976,7 +976,7 @@ class gl_api(object): name and number (which may be None) of the category. """ list = [] - for cat_type in xrange(0,4): + for cat_type in xrange(4): keys = self.categories[cat_type].keys() keys.sort() diff --git a/src/mapi/glapi/gen/gl_gentable.py b/src/mapi/glapi/gen/gl_gentable.py index 40da8161c6..a3f3e546f5 100644 --- a/src/mapi/glapi/gen/gl_gentable.py +++ b/src/mapi/glapi/gen/gl_gentable.py @@ -197,13 +197,13 @@ class PrintCode(gl_XML.gl_print_base): # Check that the table has no gaps. We expect a function at every offset, # and the code which generates the table relies on this. - for i in xrange(0, func_count): + for i in xrange(func_count): if funcnames[i] is None: raise Exception("Function table has no function at offset %d" % (i)) print "#define GLAPI_TABLE_COUNT %d" % func_count print "static const char * const _glapi_table_func_names[GLAPI_TABLE_COUNT] = {" - for i in xrange(0, func_count): + for i in xrange(func_count): print " /* %5d */ \"%s\"," % (i, funcnames[i]) print "};" |