Kill off some null comparisons with stack-allocated arrays

This commit is contained in:
Lioncash 2014-09-03 21:48:54 -04:00
parent 49d6d34f27
commit f21c4c485e
2 changed files with 8 additions and 8 deletions

View File

@ -367,8 +367,8 @@ static int menu_common_shader_manager_setting_toggle(
param->current = min(max(param->minimum, param->current), param->maximum);
}
else if ((!strcmp(label, "shader_apply_changes") ||
id == MENU_SETTINGS_SHADER_PASSES))
else if (!strcmp(label, "shader_apply_changes") ||
id == MENU_SETTINGS_SHADER_PASSES)
menu_setting_set(id, action);
else if (((dist_shader % 3) == 0 || id == MENU_SETTINGS_SHADER_PRESET))
{
@ -408,7 +408,7 @@ static int menu_common_shader_manager_setting_toggle(
switch (action)
{
case MENU_ACTION_START:
if (shader && shader->pass)
if (shader)
shader->pass[dist_filter].filter = RARCH_FILTER_UNSPEC;
break;
@ -436,7 +436,7 @@ static int menu_common_shader_manager_setting_toggle(
switch (action)
{
case MENU_ACTION_START:
if (shader && shader->pass)
if (shader)
{
pass->fbo.scale_x = pass->fbo.scale_y = 0;
pass->fbo.valid = false;

View File

@ -1826,8 +1826,8 @@ rarch_setting_t *setting_data_get_list(void)
#endif
CONFIG_PATH(g_settings.libretro, "libretro_path", "Libretro Path", "", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY)
CONFIG_DIR(g_settings.libretro_directory, "libretro_dir_path", "Core Directory", g_defaults.core_dir ? g_defaults.core_dir : "", "<None>", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
CONFIG_DIR(g_settings.libretro_info_path, "libretro_info_path", "Core Info Directory", g_defaults.core_info_dir ? g_defaults.core_info_dir : "", "<None>", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
CONFIG_DIR(g_settings.libretro_directory, "libretro_dir_path", "Core Directory", g_defaults.core_dir, "<None>", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
CONFIG_DIR(g_settings.libretro_info_path, "libretro_info_path", "Core Info Directory", g_defaults.core_info_dir, "<None>", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
CONFIG_PATH(g_settings.core_options_path, "core_options_path", "Core Options Path", "", "Paths", SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY)
CONFIG_PATH(g_settings.cheat_database, "cheat_database_path", "Cheat Database", "", "Paths", SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY)
CONFIG_PATH(g_settings.cheat_settings_path, "cheat_settings_path", "Cheat Settings", "", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY)
@ -1836,11 +1836,11 @@ rarch_setting_t *setting_data_get_list(void)
CONFIG_DIR(g_settings.video.filter_dir, "video_filter_dir", "VideoFilter Directory", "", "<default>", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
CONFIG_DIR(g_settings.audio.filter_dir, "audio_filter_dir", "AudioFilter Directory", "", "<default>", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
#if defined(HAVE_DYLIB) && defined(HAVE_SHADER_MANAGER)
CONFIG_DIR(g_settings.video.shader_dir, "video_shader_dir", "Shader Directory", g_defaults.shader_dir ? g_defaults.shader_dir : "", "<default>", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
CONFIG_DIR(g_settings.video.shader_dir, "video_shader_dir", "Shader Directory", g_defaults.shader_dir, "<default>", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
#endif
#ifdef HAVE_OVERLAY
CONFIG_DIR(g_extern.overlay_dir, "overlay_directory", "Overlay Directory", g_defaults.overlay_dir ? g_defaults.overlay_dir : "", "<default>", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
CONFIG_DIR(g_extern.overlay_dir, "overlay_directory", "Overlay Directory", g_defaults.overlay_dir, "<default>", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
#endif
CONFIG_DIR(g_settings.screenshot_directory, "screenshot_directory", "Screenshot Directory", "", "<Content dir>", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)
CONFIG_DIR(g_settings.input.autoconfig_dir, "joypad_autoconfig_dir", "Joypad Autoconfig Directory", "", "<default>", GROUP_NAME, SUBGROUP_NAME, general_write_handler, general_read_handler) WITH_FLAGS(SD_FLAG_ALLOW_EMPTY | SD_FLAG_PATH_DIR)