diff options
author | Dylan Baker <baker.dylan.c@gmail.com> | 2016-03-29 17:32:08 -0700 |
---|---|---|
committer | Dylan Baker <baker.dylan.c@gmail.com> | 2016-03-31 16:03:58 -0700 |
commit | 10a7ea1e8b7b2eb238349b597844252f1a28c199 (patch) | |
tree | b280469b0d855383b918c037018be7f3fbab7bbf | |
parent | 7564027a2f905dc50e6b7dd0dd933339499bc8e4 (diff) |
glapi: gl_XML.py: refactor out extra else statement
This is a pretty minor refactor, but it avoids having an else statement
with a nested if. It instead makes it one big if statement.
Signed-off-by: Dylan Baker <dylanx.c.baker@intel.com>
-rw-r--r-- | src/mapi/glapi/gen/gl_XML.py | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mapi/glapi/gen/gl_XML.py b/src/mapi/glapi/gen/gl_XML.py index 2ce6e5d75b..561a86f90e 100644 --- a/src/mapi/glapi/gen/gl_XML.py +++ b/src/mapi/glapi/gen/gl_XML.py @@ -273,8 +273,8 @@ def classify_category(name, number): 1. ARB extensions, sorted by extension number. 2. Non-ARB extensions, sorted by extension number. 3. Un-numbered extensions, sorted by extension name. - """ + """ try: core_version = float(name) except (ValueError, TypeError): @@ -286,13 +286,12 @@ def classify_category(name, number): elif name.startswith("GL_ARB_") or name.startswith("GLX_ARB_") or name.startswith("WGL_ARB_"): cat_type = 1 key = int(number) + elif number is not None: + cat_type = 2 + key = int(number) else: - if number != None: - cat_type = 2 - key = int(number) - else: - cat_type = 3 - key = name + cat_type = 3 + key = name return [cat_type, key] |