diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-13 20:40:28 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-13 20:40:28 +0200 |
| commit | 3365ead94da6739fb4f10093df444f7c8cef9df1 (patch) | |
| tree | 76911467eb182d21443845a22f0f27f5f9df2c02 /kconfiglib.py | |
| parent | 1a442963b281e2cb80c852c4074061bfcddfb448 (diff) | |
Swap some visibility conditionals.
rev_dep == "m" is relatively rare, so check it first.
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index b780495..a043a80 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -2054,7 +2054,7 @@ class Symbol(Item): return None rev_dep = self.config._eval_expr(self.rev_dep) # A bool selected to "m" gets promoted to "y" - if self.type == BOOL and rev_dep == "m": + if rev_dep == "m" and self.type == BOOL: rev_dep = "y" vis = _get_visibility(self) if tri_to_int[vis] > tri_to_int[rev_dep]: @@ -2077,7 +2077,7 @@ class Symbol(Item): return None rev_dep = self.config._eval_expr(self.rev_dep) # A bool selected to "m" gets promoted to "y" - if self.type == BOOL and rev_dep == "m": + if rev_dep == "m" and self.type == BOOL: rev_dep = "y" if tri_to_int[_get_visibility(self)] > tri_to_int[rev_dep]: return rev_dep @@ -2100,7 +2100,7 @@ class Symbol(Item): return [] rev_dep = self.config._eval_expr(self.rev_dep) # A bool selected to "m" gets promoted to "y" - if self.type == BOOL and rev_dep == "m": + if rev_dep == "m" and self.type == BOOL: rev_dep = "y" res = ["n", "m", "y"][tri_to_int[rev_dep] : tri_to_int[_get_visibility(self)] + 1] @@ -2256,7 +2256,7 @@ class Symbol(Item): if self.type == BOOL or self.type == TRISTATE: rev_dep = self.config._eval_expr(self.rev_dep) # A bool selected to "m" gets promoted to "y" - if self.type == BOOL and rev_dep == "m": + if rev_dep == "m" and self.type == BOOL: rev_dep = "y" return tri_to_int[_get_visibility(self)] > tri_to_int[rev_dep] return _get_visibility(self) != "n" |
