mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
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:
@@ -110,15 +110,14 @@ Window nvim_tabpage_get_win(Tabpage tabpage, Error *err)
|
||||
|
||||
if (tab == curtab) {
|
||||
return nvim_get_current_win();
|
||||
} else {
|
||||
FOR_ALL_WINDOWS_IN_TAB(wp, tab) {
|
||||
if (wp == tab->tp_curwin) {
|
||||
return wp->handle;
|
||||
}
|
||||
}
|
||||
// There should always be a current window for a tabpage
|
||||
abort();
|
||||
}
|
||||
FOR_ALL_WINDOWS_IN_TAB(wp, tab) {
|
||||
if (wp == tab->tp_curwin) {
|
||||
return wp->handle;
|
||||
}
|
||||
}
|
||||
// There should always be a current window for a tabpage
|
||||
abort();
|
||||
}
|
||||
|
||||
/// Gets the tabpage number
|
||||
|
Reference in New Issue
Block a user