[vte] regex: Simplify conditionals
- From: Christian Persch <chpe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [vte] regex: Simplify conditionals
- Date: Wed, 7 Oct 2015 20:15:51 +0000 (UTC)
commit 664d9f3d7be3690aa35c5cd671d05e3f0e8e09b0
Author: Christian Persch <chpe gnome org>
Date: Wed Oct 7 22:15:05 2015 +0200
regex: Simplify conditionals
src/vte.cc | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/vte.cc b/src/vte.cc
index 2f52632..dc65932 100644
--- a/src/vte.cc
+++ b/src/vte.cc
@@ -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;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]