refactor: add const and remove unnecessary casts (#22841)

This commit is contained in:
ii14
2023-04-01 02:49:51 +02:00
committed by GitHub
parent 83bfd94d1d
commit d5f6176e6d
21 changed files with 71 additions and 73 deletions

View File

@@ -551,7 +551,7 @@ void spell_suggest(int count)
vim_snprintf(IObuff, IOSIZE, ":ot \"%.*s\" egnahC",
sug.su_badlen, sug.su_badptr);
}
msg_puts((const char *)IObuff);
msg_puts(IObuff);
msg_clr_eos();
msg_putchar('\n');
@@ -570,16 +570,16 @@ void spell_suggest(int count)
if (cmdmsg_rl) {
rl_mirror_ascii(IObuff);
}
msg_puts((const char *)IObuff);
msg_puts(IObuff);
vim_snprintf(IObuff, IOSIZE, " \"%s\"", wcopy);
msg_puts((const char *)IObuff);
msg_puts(IObuff);
// The word may replace more than "su_badlen".
if (sug.su_badlen < stp->st_orglen) {
vim_snprintf(IObuff, IOSIZE, _(" < \"%.*s\""),
stp->st_orglen, sug.su_badptr);
msg_puts((const char *)IObuff);
msg_puts(IObuff);
}
if (p_verbose > 0) {
@@ -597,7 +597,7 @@ void spell_suggest(int count)
rl_mirror_ascii(IObuff + 1);
}
msg_advance(30);
msg_puts((const char *)IObuff);
msg_puts(IObuff);
}
msg_putchar('\n');
}