Mercurial > vim
diff src/evalwindow.c @ 29442:827d9f2b7a71 v9.0.0063
patch 9.0.0063: too many type casts for dict_get functions
Commit: https://github.com/vim/vim/commit/d61efa50f8f5b9d9dcbc136705cc33874f0fdcb3
Author: Bram Moolenaar <Bram@vim.org>
Date: Sat Jul 23 09:52:04 2022 +0100
patch 9.0.0063: too many type casts for dict_get functions
Problem: Too many type casts for dict_get functions.
Solution: Change the key argument from "char_u *" to "char *".
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Sat, 23 Jul 2022 11:00:04 +0200 |
parents | 755ab148288b |
children | 86eb4aba16c3 |
line wrap: on
line diff
--- a/src/evalwindow.c +++ b/src/evalwindow.c @@ -1016,11 +1016,11 @@ f_win_splitmove(typval_T *argvars, typva } d = argvars[2].vval.v_dict; - if (dict_get_bool(d, (char_u *)"vertical", FALSE)) + if (dict_get_bool(d, "vertical", FALSE)) flags |= WSP_VERT; if ((di = dict_find(d, (char_u *)"rightbelow", -1)) != NULL) flags |= tv_get_bool(&di->di_tv) ? WSP_BELOW : WSP_ABOVE; - size = (int)dict_get_number(d, (char_u *)"size"); + size = (int)dict_get_number(d, "size"); } win_move_into_split(wp, targetwin, size, flags); @@ -1236,27 +1236,27 @@ f_winrestview(typval_T *argvars, typval_ else { if (dict_has_key(dict, "lnum")) - curwin->w_cursor.lnum = (linenr_T)dict_get_number(dict, (char_u *)"lnum"); + curwin->w_cursor.lnum = (linenr_T)dict_get_number(dict, "lnum"); if (dict_has_key(dict, "col")) - curwin->w_cursor.col = (colnr_T)dict_get_number(dict, (char_u *)"col"); + curwin->w_cursor.col = (colnr_T)dict_get_number(dict, "col"); if (dict_has_key(dict, "coladd")) - curwin->w_cursor.coladd = (colnr_T)dict_get_number(dict, (char_u *)"coladd"); + curwin->w_cursor.coladd = (colnr_T)dict_get_number(dict, "coladd"); if (dict_has_key(dict, "curswant")) { - curwin->w_curswant = (colnr_T)dict_get_number(dict, (char_u *)"curswant"); + curwin->w_curswant = (colnr_T)dict_get_number(dict, "curswant"); curwin->w_set_curswant = FALSE; } if (dict_has_key(dict, "topline")) - set_topline(curwin, (linenr_T)dict_get_number(dict, (char_u *)"topline")); + set_topline(curwin, (linenr_T)dict_get_number(dict, "topline")); #ifdef FEAT_DIFF if (dict_has_key(dict, "topfill")) - curwin->w_topfill = (int)dict_get_number(dict, (char_u *)"topfill"); + curwin->w_topfill = (int)dict_get_number(dict, "topfill"); #endif if (dict_has_key(dict, "leftcol")) - curwin->w_leftcol = (colnr_T)dict_get_number(dict, (char_u *)"leftcol"); + curwin->w_leftcol = (colnr_T)dict_get_number(dict, "leftcol"); if (dict_has_key(dict, "skipcol")) - curwin->w_skipcol = (colnr_T)dict_get_number(dict, (char_u *)"skipcol"); + curwin->w_skipcol = (colnr_T)dict_get_number(dict, "skipcol"); check_cursor(); win_new_height(curwin, curwin->w_height);