aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/regexp_bt.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2022-08-16 12:26:08 +0100
committerGitHub <noreply@github.com>2022-08-16 12:26:08 +0100
commit542fa8a9cc10abb8eddab25a19844d19b94f53c1 (patch)
treefa29fc00d016beaddd5893336c19d12757e16494 /src/nvim/regexp_bt.c
parent9a4b8dc603fb9f5a804d69951848e0ff75d0905f (diff)
downloadrneovim-542fa8a9cc10abb8eddab25a19844d19b94f53c1.tar.gz
rneovim-542fa8a9cc10abb8eddab25a19844d19b94f53c1.tar.bz2
rneovim-542fa8a9cc10abb8eddab25a19844d19b94f53c1.zip
refactor: change pre-decrement/increment to post (#19799)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Diffstat (limited to 'src/nvim/regexp_bt.c')
-rw-r--r--src/nvim/regexp_bt.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/nvim/regexp_bt.c b/src/nvim/regexp_bt.c
index f79a772795..769d2ceeef 100644
--- a/src/nvim/regexp_bt.c
+++ b/src/nvim/regexp_bt.c
@@ -2189,7 +2189,7 @@ collection:
while (*regparse != NUL && *regparse != ']') {
if (*regparse == '-') {
- ++regparse;
+ regparse++;
// The '-' is not used for a range at the end and
// after or before a '\n'.
if (*regparse == ']' || *regparse == NUL
@@ -2619,7 +2619,7 @@ static char_u *regpiece(int *flagp)
regoptail(ret, regnode(BACK));
regoptail(ret, ret);
reginsert_limits(BRACE_LIMITS, minval, maxval, ret);
- ++num_complex_braces;
+ num_complex_braces++;
}
if (minval > 0 && maxval > 0) {
*flagp = (HASWIDTH | (flags & (HASNL | HASLOOKBH)));
@@ -2792,7 +2792,7 @@ static char_u *reg(int paren, int *flagp)
EMSG2_RET_NULL(_("E51: Too many %s("), reg_magic == MAGIC_ALL);
}
parno = regnpar;
- ++regnpar;
+ regnpar++;
ret = regnode(MOPEN + parno);
} else if (paren == REG_NPAREN) {
// Make a NOPEN node.
@@ -3181,7 +3181,7 @@ static int regrepeat(char_u *p, long maxcount)
} else {
break;
}
- ++count;
+ count++;
}
break;
@@ -3299,7 +3299,7 @@ do_class:
} else {
break;
}
- ++count;
+ count++;
}
break;
@@ -3415,7 +3415,7 @@ do_class:
break;
}
scan += len;
- ++count;
+ count++;
}
}
}
@@ -3453,7 +3453,7 @@ do_class:
}
scan++;
}
- ++count;
+ count++;
}
break;