From 9b4ee08d0b11edbc72644e88d163ca01df2b6cc2 Mon Sep 17 00:00:00 2001 From: John Halley Gotway Date: Wed, 7 Dec 2022 10:04:43 -0700 Subject: [PATCH] Per #2366, missing a couple of else blocks. --- src/libcode/vx_data2d/var_info.cc | 2 +- src/tools/core/grid_stat/grid_stat_conf_info.cc | 9 ++++++--- src/tools/core/point_stat/point_stat_conf_info.cc | 9 ++++++--- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/libcode/vx_data2d/var_info.cc b/src/libcode/vx_data2d/var_info.cc index f137281819..a5fb06fdbf 100644 --- a/src/libcode/vx_data2d/var_info.cc +++ b/src/libcode/vx_data2d/var_info.cc @@ -937,7 +937,7 @@ ConcatString raw_magic_str(Dictionary i_edict, GrdFileType file_type) { bool is_req_level_match(const ConcatString &s1, const ConcatString &s2) { bool match = true; - // No match if either is non-empty and they are not equal. + // No match if either is non-empty and they are not equal if((s1.nonempty() || s2.nonempty()) && !(s1 == s2)) match = false; return(match); diff --git a/src/tools/core/grid_stat/grid_stat_conf_info.cc b/src/tools/core/grid_stat/grid_stat_conf_info.cc index abef1ade0d..6173eda494 100644 --- a/src/tools/core/grid_stat/grid_stat_conf_info.cc +++ b/src/tools/core/grid_stat/grid_stat_conf_info.cc @@ -201,6 +201,7 @@ void GridStatConfInfo::process_config(GrdFileType ftype, << "Using the first match found. Set the \"level\" strings to " << "differentiate between them.\n\n"; } + // Use the first match else { vx_opt[i].fcst_info->set_uv_index(j); vx_opt[i].obs_info->set_uv_index(j); @@ -237,9 +238,11 @@ void GridStatConfInfo::process_config(GrdFileType ftype, << "Using the first match found. Set the \"level\" strings to " << "differentiate between them.\n\n"; } - - vx_opt[i].fcst_info->set_uv_index(j); - vx_opt[i].obs_info->set_uv_index(j); + // Use the first match + else { + vx_opt[i].fcst_info->set_uv_index(j); + vx_opt[i].obs_info->set_uv_index(j); + } } } diff --git a/src/tools/core/point_stat/point_stat_conf_info.cc b/src/tools/core/point_stat/point_stat_conf_info.cc index a94aac2e9b..ab387ba107 100644 --- a/src/tools/core/point_stat/point_stat_conf_info.cc +++ b/src/tools/core/point_stat/point_stat_conf_info.cc @@ -195,9 +195,11 @@ void PointStatConfInfo::process_config(GrdFileType ftype) { << "Using the first match found. Set the \"level\" strings to " << "differentiate between them.\n\n"; } - - vx_opt[i].vx_pd.fcst_info->set_uv_index(j); - vx_opt[i].vx_pd.obs_info->set_uv_index(j); + // Use the first match + else { + vx_opt[i].vx_pd.fcst_info->set_uv_index(j); + vx_opt[i].vx_pd.obs_info->set_uv_index(j); + } } } @@ -230,6 +232,7 @@ void PointStatConfInfo::process_config(GrdFileType ftype) { << "Using the first match found. Set the \"level\" strings to " << "differentiate between them.\n\n"; } + // Use the first match else { vx_opt[i].vx_pd.fcst_info->set_uv_index(j); vx_opt[i].vx_pd.obs_info->set_uv_index(j);