diff options
author | ii14 <59243201+ii14@users.noreply.github.com> | 2023-04-07 21:08:16 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-07 21:08:16 +0200 |
commit | 04933b1ea968f958d2541dd65fd33ebb503caac3 (patch) | |
tree | 430e333892c440dccce4d1b4606c83ab36f817c5 /src/nvim/mbyte.c | |
parent | 9408f2dcf7cade2631688300e9b58eed6bc5219a (diff) | |
download | rneovim-04933b1ea968f958d2541dd65fd33ebb503caac3.tar.gz rneovim-04933b1ea968f958d2541dd65fd33ebb503caac3.tar.bz2 rneovim-04933b1ea968f958d2541dd65fd33ebb503caac3.zip |
refactor: remove redundant casts
Diffstat (limited to 'src/nvim/mbyte.c')
-rw-r--r-- | src/nvim/mbyte.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/mbyte.c b/src/nvim/mbyte.c index 6ab7aee29d..b44c3e52cb 100644 --- a/src/nvim/mbyte.c +++ b/src/nvim/mbyte.c @@ -367,7 +367,7 @@ static int enc_canon_search(const char *name) int enc_canon_props(const char *name) FUNC_ATTR_PURE { - int i = enc_canon_search((char *)name); + int i = enc_canon_search(name); if (i >= 0) { return enc_canon_table[i].prop; } else if (strncmp(name, "2byte-", 6) == 0) { @@ -538,9 +538,9 @@ int utf_ptr2cells_len(const char *p, int size) if (utf_ptr2len_len(p, size) < utf8len_tab[(uint8_t)(*p)]) { return 1; // truncated } - int c = utf_ptr2char((char *)p); + int c = utf_ptr2char(p); // An illegal byte is displayed as <xx>. - if (utf_ptr2len((char *)p) == 1 || c == NUL) { + if (utf_ptr2len(p) == 1 || c == NUL) { return 4; } // If the char is ASCII it must be an overlong sequence. @@ -719,7 +719,7 @@ bool utf_composinglike(const char *p1, const char *p2) { int c2; - c2 = utf_ptr2char((char *)p2); + c2 = utf_ptr2char(p2); if (utf_iscomposing(c2)) { return true; } |