aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/indent_c.c
diff options
context:
space:
mode:
authorLewis Russell <lewis6991@gmail.com>2022-08-24 22:49:25 +0100
committerLewis Russell <lewis6991@gmail.com>2022-08-25 13:10:41 +0100
commit93f24403f8cc760ff47979c596976b53a8b16358 (patch)
tree93d2d2879aba8d563fde484d1fae5864b18134bc /src/nvim/indent_c.c
parent1b29288709e75064b9188420d46e1028d7ee341e (diff)
downloadrneovim-93f24403f8cc760ff47979c596976b53a8b16358.tar.gz
rneovim-93f24403f8cc760ff47979c596976b53a8b16358.tar.bz2
rneovim-93f24403f8cc760ff47979c596976b53a8b16358.zip
refactor: pre-incr to post-incr
Diffstat (limited to 'src/nvim/indent_c.c')
-rw-r--r--src/nvim/indent_c.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/nvim/indent_c.c b/src/nvim/indent_c.c
index 34a3de4f78..fe8c235cc1 100644
--- a/src/nvim/indent_c.c
+++ b/src/nvim/indent_c.c
@@ -383,7 +383,7 @@ bool cin_islabel(void) // XXX
cursor_save = curwin->w_cursor;
while (curwin->w_cursor.lnum > 1) {
- --curwin->w_cursor.lnum;
+ curwin->w_cursor.lnum--;
/*
* If we're in a comment or raw string now, skip to the start of
@@ -434,7 +434,7 @@ static int cin_isinit(void)
for (;;) {
int i, l;
- for (i = 0; i < (int)ARRAY_SIZE(skip); ++i) {
+ for (i = 0; i < (int)ARRAY_SIZE(skip); i++) {
l = (int)strlen(skip[i]);
if (cin_starts_with(s, skip[i])) {
s = cin_skipcomment(s + l);
@@ -465,7 +465,7 @@ bool cin_iscase(const char_u *s, bool strict)
{
s = cin_skipcomment(s);
if (cin_starts_with(s, "case")) {
- for (s += 4; *s; ++s) {
+ for (s += 4; *s; s++) {
s = cin_skipcomment(s);
if (*s == NUL) {
break;
@@ -588,7 +588,7 @@ static bool cin_is_cpp_namespace(const char_u *s)
*/
static const char_u *after_label(const char_u *l)
{
- for (; *l; ++l) {
+ for (; *l; l++) {
if (*l == ':') {
if (l[1] == ':') { // skip over "::" for C++
l++;
@@ -2330,7 +2330,7 @@ int get_c_indent(void)
/* look for opening unmatched paren, indent one level
* for each additional level */
n = 1;
- for (col = 0; col < our_paren_pos.col; ++col) {
+ for (col = 0; col < our_paren_pos.col; col++) {
switch (l[col]) {
case '(':
case '{':
@@ -2388,7 +2388,7 @@ int get_c_indent(void)
* but ignore (void) before the line (ignore_paren_col). */
col = our_paren_pos.col;
while ((int)our_paren_pos.col > ignore_paren_col) {
- --our_paren_pos.col;
+ our_paren_pos.col--;
switch (*ml_get_pos(&our_paren_pos)) {
case '(':
amount += curbuf->b_ind_unclosed2;