summaryrefslogtreecommitdiffstats
path: root/src/intel
diff options
context:
space:
mode:
authorDylan Baker <[email protected]>2017-02-21 11:07:44 -0800
committerDylan Baker <[email protected]>2017-03-22 16:22:00 -0700
commit4d4697f86889d6ef89cf8bab94ebcfb4b7be461d (patch)
tree770cb7faf4d32fdb38ba4a6b3e8f5cee4b915bfa /src/intel
parent96a5f2a5acbe952ce6b18e74edf99b46777f15fc (diff)
anv: use dict.get in anv_entrypoints_gen.py
Instead of using an if and a check, use dict.get, which does the same thing, but more succinctly. Signed-off-by: Dylan Baker <[email protected]>
Diffstat (limited to 'src/intel')
-rw-r--r--src/intel/vulkan/anv_entrypoints_gen.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/intel/vulkan/anv_entrypoints_gen.py b/src/intel/vulkan/anv_entrypoints_gen.py
index 6b2d4220150..b5bd6f17656 100644
--- a/src/intel/vulkan/anv_entrypoints_gen.py
+++ b/src/intel/vulkan/anv_entrypoints_gen.py
@@ -295,10 +295,7 @@ def get_entrypoints(doc, entrypoints_to_defines):
shortname = fullname[2:]
params = (''.join(p.itertext()) for p in command.findall('./param'))
params = ', '.join(params)
- if fullname in entrypoints_to_defines:
- guard = entrypoints_to_defines[fullname]
- else:
- guard = None
+ guard = entrypoints_to_defines.get(fullname)
entrypoints.append((type, shortname, params, index, cal_hash(fullname), guard))
index += 1