diff options
author | Christian Persch <chpe@gnome.org> | 2015-10-07 22:15:05 +0200 |
---|---|---|
committer | Christian Persch <chpe@gnome.org> | 2015-10-07 22:15:05 +0200 |
commit | 664d9f3d7be3690aa35c5cd671d05e3f0e8e09b0 (patch) | |
tree | 6666f8d53a4a525cee6f424d4008be04dd224535 | |
parent | 1855deb46bda149aa1463e05761e3e7f583eed64 (diff) | |
download | vte-664d9f3d7be3690aa35c5cd671d05e3f0e8e09b0.tar.gz |
regex: Simplify conditionals
-rw-r--r-- | src/vte.cc | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -1748,7 +1748,7 @@ vte_terminal_match_check_internal_pcre(VteTerminal *terminal, } - if (ko > rm_eo - 1 && rm_eo > sblank) { + if (ko >= rm_eo && rm_eo > sblank) { sblank = rm_eo; } if (ko < rm_so && rm_so < eblank) { @@ -1895,12 +1895,10 @@ vte_terminal_match_check_internal_gregex(VteTerminal *terminal, g_match_info_free(match_info); return result; } - if (ko > rm_eo - 1 && - rm_eo > sblank) { + if (ko >= rm_eo && rm_eo > sblank) { sblank = rm_eo; } - if (ko < rm_so && - rm_so < eblank) { + if (ko < rm_so && rm_so < eblank) { eblank = rm_so; } |