diff options
author | Dylan Baker <dylan@pnwbakers.com> | 2019-04-22 16:33:07 -0700 |
---|---|---|
committer | Dylan Baker <dylan@pnwbakers.com> | 2019-04-25 12:28:51 -0700 |
commit | c30ccae0b66513c8b13e1aae03307500a6ee7945 (patch) | |
tree | 4bd5a3918acfe8a44fb42794d06cbad957651c9d /mesonbuild/mesonlib.py | |
parent | fa26844f671d62ad0c8a23ed89a41d6415b560f7 (diff) | |
download | meson-c30ccae0b66513c8b13e1aae03307500a6ee7945.zip meson-c30ccae0b66513c8b13e1aae03307500a6ee7945.tar.gz meson-c30ccae0b66513c8b13e1aae03307500a6ee7945.tar.bz2 |
mesonlib: Remove useless repetition of the same check
due to refactoring this is now useless.
Diffstat (limited to 'mesonbuild/mesonlib.py')
-rw-r--r-- | mesonbuild/mesonlib.py | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/mesonbuild/mesonlib.py b/mesonbuild/mesonlib.py index 7b9aa1e..1d1e619 100644 --- a/mesonbuild/mesonlib.py +++ b/mesonbuild/mesonlib.py @@ -548,16 +548,7 @@ class Version: # sort a non-digit sequence before a digit sequence ours_is_int = isinstance(ours, int) if ours_is_int != isinstance(theirs, int): - return 1 if isinstance(ours, int) else -1 - - # compare as numbers - if ours_is_int: - # because leading zeros have already been removed, if one number - # has more digits, it is greater - c = cmp(ours, theirs) - if c != 0: - return c - # fallthrough + return 1 if ours_is_int else -1 # compare lexicographically c = cmp(ours, theirs) |