diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2021-10-27 11:19:39 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2021-11-01 12:24:25 -0700 |
commit | 86df7dd6273498e3256f4944b6b584636ae6ffb5 (patch) | |
tree | 9daf44d6431d401fff1e800a25cbf7afcceb8faa | |
parent | 83facb39593fbfa4d9cd68e86f5f56f86f1fe1eb (diff) | |
download | meson-86df7dd6273498e3256f4944b6b584636ae6ffb5.zip meson-86df7dd6273498e3256f4944b6b584636ae6ffb5.tar.gz meson-86df7dd6273498e3256f4944b6b584636ae6ffb5.tar.bz2 |
modules/gnome: don't use dict.keys() to test membership
This is slower than looking in the dictionary, as the dict lookup is
O(log n), while keys() is O(n).
-rw-r--r-- | mesonbuild/modules/gnome.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/modules/gnome.py b/mesonbuild/modules/gnome.py index edf8e55..ddde779 100644 --- a/mesonbuild/modules/gnome.py +++ b/mesonbuild/modules/gnome.py @@ -269,10 +269,10 @@ class GnomeModule(ExtensionModule): output = f'{target_name}.gresource' name = f'{target_name}_gresource' else: - if 'c' in state.environment.coredata.compilers.host.keys(): + if 'c' in state.environment.coredata.compilers.host: output = f'{target_name}.c' name = f'{target_name}_c' - elif 'cpp' in state.environment.coredata.compilers.host.keys(): + elif 'cpp' in state.environment.coredata.compilers.host: output = f'{target_name}.cpp' name = f'{target_name}_cpp' else: |