From 3e45884b6742ed77dcd2350b981e8cb0581c348f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 20 Oct 2014 19:22:33 +0200 Subject: [PATCH] Rename local variables named 'index' elsewhere --- general.c | 4 ++-- playlist.c | 8 ++++---- settings_data.c | 2 +- settings_data.h | 6 +++--- settings_list.c | 32 ++++++++++++++++---------------- string_list.h | 2 +- 6 files changed, 27 insertions(+), 27 deletions(-) diff --git a/general.c b/general.c index 7748f7243c..f57c2a87d5 100644 --- a/general.c +++ b/general.c @@ -18,13 +18,13 @@ #include "general.h" void rarch_playlist_load_content(content_playlist_t *playlist, - unsigned index) + unsigned idx) { const char *path = NULL; const char *core_path = NULL; content_playlist_get_index(playlist, - index, &path, &core_path, NULL); + idx, &path, &core_path, NULL); strlcpy(g_settings.libretro, core_path, sizeof(g_settings.libretro)); diff --git a/playlist.c b/playlist.c index 95f88d0f5a..de44be0bda 100644 --- a/playlist.c +++ b/playlist.c @@ -42,7 +42,7 @@ struct content_playlist }; void content_playlist_get_index(content_playlist_t *playlist, - size_t index, + size_t idx, const char **path, const char **core_path, const char **core_name) { @@ -50,11 +50,11 @@ void content_playlist_get_index(content_playlist_t *playlist, return; if (path) - *path = playlist->entries[index].path; + *path = playlist->entries[idx].path; if (core_path) - *core_path = playlist->entries[index].core_path; + *core_path = playlist->entries[idx].core_path; if (core_name) - *core_name = playlist->entries[index].core_name; + *core_name = playlist->entries[idx].core_name; } static void content_playlist_free_entry( diff --git a/settings_data.c b/settings_data.c index 7a950c8500..9939659166 100644 --- a/settings_data.c +++ b/settings_data.c @@ -2116,7 +2116,7 @@ extern unsigned menu_current_gx_resolution; static int get_fallback_label(char *type_str, size_t type_str_size, unsigned *w, unsigned type, - const char *menu_label, const char *label, unsigned index) + const char *menu_label, const char *label, unsigned idx) { int ret = 0; diff --git a/settings_data.h b/settings_data.h index d02f2819f2..5bdabd6267 100644 --- a/settings_data.h +++ b/settings_data.h @@ -79,8 +79,8 @@ rarch_setting_t setting_data_string_setting(enum setting_type type, change_handler_t change_handler, change_handler_t read_handler); rarch_setting_t setting_data_bind_setting(const char* name, - const char* description, struct retro_keybind* target, uint32_t index, - uint32_t index_offset, + const char* description, struct retro_keybind* target, uint32_t idx, + uint32_t idx_offset, const struct retro_keybind* default_value, const char *group, const char *subgroup); @@ -90,7 +90,7 @@ int setting_data_get_description(const char *label, char *msg, #ifdef HAVE_MENU void setting_data_get_label(char *type_str, size_t type_str_size, unsigned *w, unsigned type, - const char *menu_label, const char *label, unsigned index); + const char *menu_label, const char *label, unsigned idx); #endif rarch_setting_t* setting_data_new(unsigned mask); diff --git a/settings_list.c b/settings_list.c index accdf5fe9a..b37ee4191e 100644 --- a/settings_list.c +++ b/settings_list.c @@ -66,8 +66,8 @@ void settings_list_current_add_bind_type( rarch_setting_info_t *list_info, unsigned type) { - unsigned index = list_info->index - 1; - (*list)[index].bind_type = type; + unsigned idx = list_info->index - 1; + (*list)[idx].bind_type = type; } void settings_list_current_add_flags( @@ -75,13 +75,13 @@ void settings_list_current_add_flags( rarch_setting_info_t *list_info, unsigned values) { - unsigned index = list_info->index - 1; - (*list)[index].flags |= values; + unsigned idx = list_info->index - 1; + (*list)[idx].flags |= values; if (values & SD_FLAG_IS_DEFERRED) { - (*list)[index].deferred_handler = (*list)[index].change_handler; - (*list)[index].change_handler = null_write_handler; + (*list)[idx].deferred_handler = (*list)[idx].change_handler; + (*list)[idx].change_handler = null_write_handler; } } @@ -91,13 +91,13 @@ void settings_list_current_add_range( float min, float max, float step, bool enforce_minrange_enable, bool enforce_maxrange_enable) { - unsigned index = list_info->index - 1; + unsigned idx = list_info->index - 1; - (*list)[index].min = min; - (*list)[index].step = step; - (*list)[index].max = max; - (*list)[index].enforce_minrange = enforce_minrange_enable; - (*list)[index].enforce_maxrange = enforce_maxrange_enable; + (*list)[idx].min = min; + (*list)[idx].step = step; + (*list)[idx].max = max; + (*list)[idx].enforce_minrange = enforce_minrange_enable; + (*list)[idx].enforce_maxrange = enforce_maxrange_enable; settings_list_current_add_flags(list, list_info, SD_FLAG_HAS_RANGE); } @@ -107,8 +107,8 @@ void settings_list_current_add_values( rarch_setting_info_t *list_info, const char *values) { - unsigned index = list_info->index - 1; - (*list)[index].values = values; + unsigned idx = list_info->index - 1; + (*list)[idx].values = values; } void settings_list_current_add_cmd( @@ -116,8 +116,8 @@ void settings_list_current_add_cmd( rarch_setting_info_t *list_info, unsigned values) { - unsigned index = list_info->index - 1; - (*list)[index].cmd_trigger.idx = values; + unsigned idx = list_info->index - 1; + (*list)[idx].cmd_trigger.idx = values; } void settings_list_free(rarch_setting_t *list) diff --git a/string_list.h b/string_list.h index 9a3cbc9664..d645bc3793 100644 --- a/string_list.h +++ b/string_list.h @@ -62,7 +62,7 @@ void string_list_free(struct string_list *list); void string_list_join_concat(char *buffer, size_t size, const struct string_list *list, const char *sep); -void string_list_set(struct string_list *list, unsigned index, +void string_list_set(struct string_list *list, unsigned idx, const char *str); #ifdef __cplusplus