summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2015-06-13 20:22:03 +0200
committerUlf Magnusson <ulfalizer@gmail.com>2015-06-13 20:22:03 +0200
commit1a442963b281e2cb80c852c4074061bfcddfb448 (patch)
tree44221df261346f70e4d432300f7f8e8f7dfaeeb0
parentc3fbf278eb1a6c25b1c1e26963042811a370fed9 (diff)
Simplify visibility functions.
Not sure why I used that form the first time around.
-rw-r--r--kconfiglib.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/kconfiglib.py b/kconfiglib.py
index c07f3b9..b780495 100644
--- a/kconfiglib.py
+++ b/kconfiglib.py
@@ -2057,7 +2057,7 @@ class Symbol(Item):
if self.type == BOOL and rev_dep == "m":
rev_dep = "y"
vis = _get_visibility(self)
- if (tri_to_int[vis] - tri_to_int[rev_dep]) > 0:
+ if tri_to_int[vis] > tri_to_int[rev_dep]:
return vis
return None
@@ -2079,7 +2079,7 @@ class Symbol(Item):
# A bool selected to "m" gets promoted to "y"
if self.type == BOOL and rev_dep == "m":
rev_dep = "y"
- if (tri_to_int[_get_visibility(self)] - tri_to_int[rev_dep]) > 0:
+ if tri_to_int[_get_visibility(self)] > tri_to_int[rev_dep]:
return rev_dep
return None
@@ -2258,8 +2258,7 @@ class Symbol(Item):
# A bool selected to "m" gets promoted to "y"
if self.type == BOOL and rev_dep == "m":
rev_dep = "y"
- return (tri_to_int[_get_visibility(self)] -
- tri_to_int[rev_dep]) > 0
+ return tri_to_int[_get_visibility(self)] > tri_to_int[rev_dep]
return _get_visibility(self) != "n"
def is_defined(self):