Merge pull request #20821 from dundargoc/refactor/clang-tidy

refactor: fix clang-tidy warnings
This commit is contained in:
bfredl
2022-11-08 09:48:48 +01:00
committed by GitHub
56 changed files with 558 additions and 555 deletions

View File

@@ -271,9 +271,8 @@ newwindow:
for (wp = firstwin; --Prenum > 0;) {
if (wp->w_next == NULL) {
break;
} else {
wp = wp->w_next;
}
wp = wp->w_next;
}
} else {
if (nchar == 'W') { // go to previous window
@@ -873,9 +872,8 @@ int win_fdccol_count(win_T *wp)
const int fdccol = fdc[4] == ':' ? fdc[5] - '0' : 1;
int needed_fdccols = getDeepestNesting(wp);
return MIN(fdccol, needed_fdccols);
} else {
return fdc[0] - '0';
}
return fdc[0] - '0';
}
void ui_ext_win_position(win_T *wp, bool validate)
@@ -4870,12 +4868,11 @@ win_T *buf_jump_open_win(buf_T *buf)
if (curwin->w_buffer == buf) {
win_enter(curwin, false);
return curwin;
} else {
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
if (wp->w_buffer == buf) {
win_enter(wp, false);
return wp;
}
}
FOR_ALL_WINDOWS_IN_TAB(wp, curtab) {
if (wp->w_buffer == buf) {
win_enter(wp, false);
return wp;
}
}
@@ -6646,12 +6643,11 @@ static bool resize_frame_for_winbar(frame_T *fr)
if (fp == NULL || fp == fr) {
emsg(_(e_noroom));
return false;
} else {
frame_new_height(fp, fp->fr_height - 1, false, false);
win_new_height(wp, wp->w_height + 1);
frame_fix_height(wp);
(void)win_comp_pos();
}
frame_new_height(fp, fp->fr_height - 1, false, false);
win_new_height(wp, wp->w_height + 1);
frame_fix_height(wp);
(void)win_comp_pos();
return true;
}