Cleanup to menu_settings_find_internal functions

This commit is contained in:
twinaphex 2016-06-15 17:15:05 +02:00
parent dd04705d25
commit 61b7d13086

View File

@ -2018,11 +2018,10 @@ static rarch_setting_t *menu_setting_find_internal(rarch_setting_t *setting,
{
for (; menu_setting_get_type(setting) != ST_NONE; menu_settings_list_increment(&setting))
{
const char *name = menu_setting_get_name(setting);
const char *short_description = menu_setting_get_short_description(setting);
if (needle == setting->name_hash && menu_setting_get_type(setting) <= ST_GROUP)
{
const char *name = menu_setting_get_name(setting);
const char *short_description = menu_setting_get_short_description(setting);
/* make sure this isn't a collision */
if (!string_is_equal(label, name))
continue;
@ -2045,10 +2044,9 @@ static rarch_setting_t *menu_setting_find_internal_enum(rarch_setting_t *setting
{
for (; menu_setting_get_type(setting) != ST_NONE; menu_settings_list_increment(&setting))
{
const char *short_description = menu_setting_get_short_description(setting);
if (setting->enum_idx == enum_idx && menu_setting_get_type(setting) <= ST_GROUP)
{
const char *short_description = menu_setting_get_short_description(setting);
if (string_is_empty(short_description))
return NULL;