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

@@ -2137,9 +2137,8 @@ static int check_readonly(int *forceit, buf_T *buf)
// Set forceit, to force the writing of a readonly file
*forceit = true;
return false;
} else {
return true;
}
return true;
} else if (buf->b_p_ro) {
emsg(_(e_readonly));
} else {