1
0
forked from aniani/vim

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 *".
This commit is contained in:
Bram Moolenaar
2022-07-23 09:52:04 +01:00
parent 5ac50de83f
commit d61efa50f8
24 changed files with 193 additions and 202 deletions

View File

@@ -4317,8 +4317,7 @@ hldict_attr_to_str(
p = attr_str;
for (i = 0; i < (int)ARRAY_LENGTH(hl_name_table); i++)
{
if (dict_get_bool(attrdict, (char_u *)hl_name_table[i],
VVAL_FALSE) == VVAL_TRUE)
if (dict_get_bool(attrdict, hl_name_table[i], VVAL_FALSE) == VVAL_TRUE)
{
if (p != attr_str && (size_t)(p - attr_str + 2) < len)
STRCPY(p, (char_u *)",");
@@ -4398,10 +4397,10 @@ hlg_add_or_update(dict_T *dict)
if (name == NULL || *name == NUL || error)
return FALSE;
if (dict_get_bool(dict, (char_u *)"force", VVAL_FALSE) == VVAL_TRUE)
if (dict_get_bool(dict, "force", VVAL_FALSE) == VVAL_TRUE)
forceit = TRUE;
if (dict_get_bool(dict, (char_u *)"default", VVAL_FALSE) == VVAL_TRUE)
if (dict_get_bool(dict, "default", VVAL_FALSE) == VVAL_TRUE)
dodefault = TRUE;
if (dict_has_key(dict, "cleared"))
@@ -4409,7 +4408,7 @@ hlg_add_or_update(dict_T *dict)
varnumber_T cleared;
// clear a highlight group
cleared = dict_get_bool(dict, (char_u *)"cleared", FALSE);
cleared = dict_get_bool(dict, "cleared", FALSE);
if (cleared == TRUE)
{
vim_snprintf((char *)hlsetBuf, HLSETBUFSZ, "clear %s", name);