diff options
author | dundargoc <33953936+dundargoc@users.noreply.github.com> | 2021-10-12 17:52:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-12 17:52:54 +0200 |
commit | 649b3160a10f0053747383f0703b0a5a94548570 (patch) | |
tree | 2898b7213ab1349717c360c8d7561a4606f3c8c2 /src/nvim/api/private/helpers.c | |
parent | 64f0fdc6822db4fc1ef5fadb892aab5bf04e75a7 (diff) | |
download | rneovim-649b3160a10f0053747383f0703b0a5a94548570.tar.gz rneovim-649b3160a10f0053747383f0703b0a5a94548570.tar.bz2 rneovim-649b3160a10f0053747383f0703b0a5a94548570.zip |
refactor: reduce number of unique char casts (#15995)
Diffstat (limited to 'src/nvim/api/private/helpers.c')
-rw-r--r-- | src/nvim/api/private/helpers.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/nvim/api/private/helpers.c b/src/nvim/api/private/helpers.c index aed87048ce..b2529db5be 100644 --- a/src/nvim/api/private/helpers.c +++ b/src/nvim/api/private/helpers.c @@ -1559,7 +1559,7 @@ int object_to_hl_id(Object obj, const char *what, Error *err) { if (obj.type == kObjectTypeString) { String str = obj.data.string; - return str.size ? syn_check_group((char_u *)str.data, (int)str.size) : 0; + return str.size ? syn_check_group(str.data, (int)str.size) : 0; } else if (obj.type == kObjectTypeInteger) { return MAX((int)obj.data.integer, 0); } else { @@ -1593,7 +1593,7 @@ HlMessage parse_hl_msg(Array chunks, Error *err) String hl = chunk.items[1].data.string; if (hl.size > 0) { // TODO(bfredl): use object_to_hl_id and allow integer - int hl_id = syn_check_group((char_u *)hl.data, (int)hl.size); + int hl_id = syn_check_group(hl.data, (int)hl.size); attr = hl_id > 0 ? syn_id2attr(hl_id) : 0; } } |