mirror of
https://github.com/neovim/neovim.git
synced 2025-10-02 07:58:35 +00:00
Merge pull request #20821 from dundargoc/refactor/clang-tidy
refactor: fix clang-tidy warnings
This commit is contained in:
@@ -833,9 +833,8 @@ uint32_t src2ns(Integer *src_id)
|
||||
}
|
||||
if (*src_id < 0) {
|
||||
return (((uint32_t)1) << 31) - 1;
|
||||
} else {
|
||||
return (uint32_t)(*src_id);
|
||||
}
|
||||
return (uint32_t)(*src_id);
|
||||
}
|
||||
|
||||
/// Adds a highlight to buffer.
|
||||
|
@@ -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
|
||||
|
@@ -532,7 +532,7 @@ Dictionary nvim_parse_expression(String expr, String flags, Boolean highlight, E
|
||||
kv_drop(ast_conv_stack, 1);
|
||||
} else {
|
||||
if (cur_item.ret_node_p->type == kObjectTypeNil) {
|
||||
size_t items_size = (size_t)(3 // "type", "start" and "len"
|
||||
size_t items_size = (size_t)(3 // "type", "start" and "len" // NOLINT(bugprone-misplaced-widening-cast)
|
||||
+ (node->children != NULL) // "children"
|
||||
+ (node->type == kExprNodeOption
|
||||
|| node->type == kExprNodePlainIdentifier) // "scope"
|
||||
|
Reference in New Issue
Block a user