mirror of
https://github.com/neovim/neovim.git
synced 2025-10-04 08:56:29 +00:00
refactor: remove redundant casts
This commit is contained in:
@@ -150,7 +150,7 @@ void do_ascii(const exarg_T *const eap)
|
||||
if (vim_isprintc_strict(c) && (c < ' ' || c > '~')) {
|
||||
char buf3[7];
|
||||
transchar_nonprint(curbuf, buf3, c);
|
||||
vim_snprintf(buf1, sizeof(buf1), " <%s>", (char *)buf3);
|
||||
vim_snprintf(buf1, sizeof(buf1), " <%s>", buf3);
|
||||
} else {
|
||||
buf1[0] = NUL;
|
||||
}
|
||||
@@ -1361,12 +1361,12 @@ char *make_filter_cmd(char *cmd, char *itmp, char *otmp)
|
||||
{
|
||||
bool is_fish_shell =
|
||||
#if defined(UNIX)
|
||||
strncmp((char *)invocation_path_tail(p_sh, NULL), "fish", 4) == 0;
|
||||
strncmp(invocation_path_tail(p_sh, NULL), "fish", 4) == 0;
|
||||
#else
|
||||
false;
|
||||
#endif
|
||||
bool is_pwsh = strncmp((char *)invocation_path_tail(p_sh, NULL), "pwsh", 4) == 0
|
||||
|| strncmp((char *)invocation_path_tail(p_sh, NULL), "powershell",
|
||||
bool is_pwsh = strncmp(invocation_path_tail(p_sh, NULL), "pwsh", 4) == 0
|
||||
|| strncmp(invocation_path_tail(p_sh, NULL), "powershell",
|
||||
10) == 0;
|
||||
|
||||
size_t len = strlen(cmd) + 1; // At least enough space for cmd + NULL.
|
||||
@@ -4288,7 +4288,7 @@ bool do_sub_msg(bool count_only)
|
||||
"%" PRId64 " matches on %" PRId64 " lines", sub_nsubs)
|
||||
: NGETTEXT("%" PRId64 " substitution on %" PRId64 " lines",
|
||||
"%" PRId64 " substitutions on %" PRId64 " lines", sub_nsubs);
|
||||
vim_snprintf_add((char *)msg_buf, sizeof(msg_buf),
|
||||
vim_snprintf_add(msg_buf, sizeof(msg_buf),
|
||||
NGETTEXT(msg_single, msg_plural, sub_nlines),
|
||||
(int64_t)sub_nsubs, (int64_t)sub_nlines);
|
||||
if (msg(msg_buf)) {
|
||||
|
Reference in New Issue
Block a user