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/change.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/change.c')
-rw-r--r-- | src/nvim/change.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/nvim/change.c b/src/nvim/change.c index 34121473ca..493207d9d5 100644 --- a/src/nvim/change.c +++ b/src/nvim/change.c @@ -1311,7 +1311,7 @@ int open_line(int dir, int flags, int second_line_indent, bool *did_do_comment) } // find start of middle part - (void)copy_option_part(&p, (char *)lead_middle, COM_MAX_LEN, ","); + (void)copy_option_part(&p, lead_middle, COM_MAX_LEN, ","); require_blank = false; } @@ -1322,7 +1322,7 @@ int open_line(int dir, int flags, int second_line_indent, bool *did_do_comment) } p++; } - (void)copy_option_part(&p, (char *)lead_middle, COM_MAX_LEN, ","); + (void)copy_option_part(&p, lead_middle, COM_MAX_LEN, ","); while (*p && p[-1] != ':') { // find end of end flags // Check whether we allow automatic ending of comments @@ -1331,7 +1331,7 @@ int open_line(int dir, int flags, int second_line_indent, bool *did_do_comment) } p++; } - size_t n = copy_option_part(&p, (char *)lead_end, COM_MAX_LEN, ","); + size_t n = copy_option_part(&p, lead_end, COM_MAX_LEN, ","); if (end_comment_pending == -1) { // we can set it now end_comment_pending = (unsigned char)lead_end[n - 1]; @@ -1352,7 +1352,7 @@ int open_line(int dir, int flags, int second_line_indent, bool *did_do_comment) // Doing "o" on a start of comment inserts the middle leader. if (lead_len > 0) { if (current_flag == COM_START) { - lead_repl = (char *)lead_middle; + lead_repl = lead_middle; lead_repl_len = (int)strlen(lead_middle); } |