diff options
author | Dundar Göc <gocdundar@gmail.com> | 2021-10-07 11:17:02 +0200 |
---|---|---|
committer | Dundar Göc <gocdundar@gmail.com> | 2021-10-07 13:16:55 +0200 |
commit | 6d9dea42012fa9ae42832f12c9fd457003cb196f (patch) | |
tree | 1aecf23386c01c10856489158e1f8ba798377356 /src/nvim/api/buffer.c | |
parent | c61a3865eea21f87ac17719ba226ad556b5a11a6 (diff) | |
download | rneovim-6d9dea42012fa9ae42832f12c9fd457003cb196f.tar.gz rneovim-6d9dea42012fa9ae42832f12c9fd457003cb196f.tar.bz2 rneovim-6d9dea42012fa9ae42832f12c9fd457003cb196f.zip |
refactor: remove redundant casts
Diffstat (limited to 'src/nvim/api/buffer.c')
-rw-r--r-- | src/nvim/api/buffer.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/api/buffer.c b/src/nvim/api/buffer.c index 3ab7e6b778..5c7190426b 100644 --- a/src/nvim/api/buffer.c +++ b/src/nvim/api/buffer.c @@ -418,7 +418,7 @@ void nvim_buf_set_lines(uint64_t channel_id, Buffer buffer, Integer start, Integ try_start(); aco_save_T aco; - aucmd_prepbuf(&aco, (buf_T *)buf); + aucmd_prepbuf(&aco, buf); if (!MODIFIABLE(buf)) { api_set_error(err, kErrorTypeException, "Buffer is not 'modifiable'"); @@ -656,7 +656,7 @@ void nvim_buf_set_text(uint64_t channel_id, Buffer buffer, Integer start_row, In try_start(); aco_save_T aco; - aucmd_prepbuf(&aco, (buf_T *)buf); + aucmd_prepbuf(&aco, buf); if (!MODIFIABLE(buf)) { api_set_error(err, kErrorTypeException, "Buffer is not 'modifiable'"); @@ -1340,7 +1340,7 @@ ArrayOf(Integer) nvim_buf_get_extmark_by_id(Buffer buffer, Integer ns_id, if (extmark.row < 0) { return rv; } - return extmark_to_array(extmark, false, (bool)details); + return extmark_to_array(extmark, false, details); } /// Gets extmarks in "traversal order" from a |charwise| region defined by @@ -1983,7 +1983,7 @@ Object nvim_buf_call(Buffer buffer, LuaRef fun, Error *err) } try_start(); aco_save_T aco; - aucmd_prepbuf(&aco, (buf_T *)buf); + aucmd_prepbuf(&aco, buf); Array args = ARRAY_DICT_INIT; Object res = nlua_call_ref(fun, NULL, args, true, err); |