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

@@ -197,10 +197,10 @@ void grid_put_schar(ScreenGrid *grid, int row, int col, char *schar, int attr)
/// like grid_puts(), but output "text[len]". When "len" is -1 output up to
/// a NUL.
int grid_puts_len(ScreenGrid *grid, char *text, int textlen, int row, int col, int attr)
int grid_puts_len(ScreenGrid *grid, const char *text, int textlen, int row, int col, int attr)
{
size_t off;
char *ptr = text;
const char *ptr = text;
int len = textlen;
int c;
size_t max_off;