mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 05:58:33 +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:
@@ -343,9 +343,8 @@ static char *get_command_complete(int arg)
|
||||
{
|
||||
if (arg >= (int)(ARRAY_SIZE(command_complete))) {
|
||||
return NULL;
|
||||
} else {
|
||||
return (char *)command_complete[arg];
|
||||
}
|
||||
return (char *)command_complete[arg];
|
||||
}
|
||||
|
||||
/// Function given to ExpandGeneric() to obtain the list of values for -complete.
|
||||
@@ -357,9 +356,8 @@ char *get_user_cmd_complete(expand_T *xp, int idx)
|
||||
char *cmd_compl = get_command_complete(idx);
|
||||
if (cmd_compl == NULL) {
|
||||
return "";
|
||||
} else {
|
||||
return cmd_compl;
|
||||
}
|
||||
return cmd_compl;
|
||||
}
|
||||
|
||||
int cmdcomplete_str_to_type(const char *complete_str)
|
||||
|
Reference in New Issue
Block a user