mirror of
https://github.com/libretro/RetroArch
synced 2025-04-09 21:45:45 +00:00
settings_data.c - casting fixes for MSVC
This commit is contained in:
parent
32d99e5806
commit
debc0ca010
@ -1557,7 +1557,7 @@ static void general_write_handler(const void *data)
|
|||||||
rarch_main_command(rarch_cmd);
|
rarch_main_command(rarch_cmd);
|
||||||
}
|
}
|
||||||
|
|
||||||
#define APPEND(VALUE) if (index==list_size) { list_size *= 2; list = realloc(list, sizeof(rarch_setting_t)*list_size); } (list[index++]) = VALUE
|
#define APPEND(VALUE) if (index == list_size) { list_size *= 2; list = (rarch_setting_t*)realloc(list, sizeof(rarch_setting_t) * list_size); } (list[index++]) = VALUE
|
||||||
#define START_GROUP(NAME) { const char *GROUP_NAME = NAME; APPEND(setting_data_group_setting (ST_GROUP, NAME));
|
#define START_GROUP(NAME) { const char *GROUP_NAME = NAME; APPEND(setting_data_group_setting (ST_GROUP, NAME));
|
||||||
#define END_GROUP() APPEND(setting_data_group_setting (ST_END_GROUP, 0)); }
|
#define END_GROUP() APPEND(setting_data_group_setting (ST_END_GROUP, 0)); }
|
||||||
#define START_SUB_GROUP(NAME) { const char *SUBGROUP_NAME = NAME; APPEND(setting_data_group_setting (ST_SUB_GROUP, NAME));
|
#define START_SUB_GROUP(NAME) { const char *SUBGROUP_NAME = NAME; APPEND(setting_data_group_setting (ST_SUB_GROUP, NAME));
|
||||||
@ -1599,8 +1599,9 @@ rarch_setting_t* setting_data_get_list(void)
|
|||||||
|
|
||||||
if (!list)
|
if (!list)
|
||||||
{
|
{
|
||||||
int list_size=512;
|
int list_size = 512;
|
||||||
list = malloc(sizeof(rarch_setting_t)*list_size);
|
|
||||||
|
list = (rarch_setting_t*)malloc(sizeof(rarch_setting_t) * list_size);
|
||||||
index = 0;
|
index = 0;
|
||||||
|
|
||||||
/***********/
|
/***********/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user