refactor: fix clang-tidy warnings

Enable and fix bugprone-misplaced-widening-cast warning.

Fix some modernize-macro-to-enum and readability-else-after-return
warnings, but don't enable them. While the warnings can be useful, they
are in general too noisy to enable.
This commit is contained in:
dundargoc
2022-10-22 12:36:38 +02:00
parent a79d28e4d7
commit 731cdde28e
56 changed files with 558 additions and 555 deletions

View File

@@ -458,9 +458,8 @@ bool cin_iscase(const char_u *s, bool strict)
// JS etc.
if (strict) {
return false; // stop at string
} else {
return true;
}
return true;
}
}
return false;
@@ -2877,14 +2876,13 @@ int get_c_indent(void)
// Line below current line is the one that starts a
// (possibly broken) line ending in a comma.
break;
} else {
amount = get_indent();
if (curwin->w_cursor.lnum - 1 == ourscope) {
// line above is start of the scope, thus current
// line is the one that stars a (possibly broken)
// line ending in a comma.
break;
}
}
amount = get_indent();
if (curwin->w_cursor.lnum - 1 == ourscope) {
// line above is start of the scope, thus current
// line is the one that stars a (possibly broken)
// line ending in a comma.
break;
}
}