Skip to content

Commit

Permalink
#2640 Do not initialize metadata_name at find_meta_name
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Soh committed Sep 1, 2023
1 parent e65360f commit 00a98f2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/tools/other/ioda2nc/ioda2nc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1262,13 +1262,15 @@ bool check_missing_thresh(float value) {
////////////////////////////////////////////////////////////////////////

ConcatString find_meta_name(string meta_key, StringArray available_names) {
ConcatString metadata_name = meta_key;
StringArray alt_names = conf_info.metadata_map[meta_key];

for(int idx =0; idx<alt_names.n(); idx++) {
if(available_names.has(alt_names[idx])) {
metadata_name = alt_names[idx];
break;
ConcatString metadata_name;
if (available_names.has(meta_key)) metadata_name = meta_key;
else {
StringArray alt_names = conf_info.metadata_map[meta_key];
for (int idx =0; idx<alt_names.n(); idx++) {
if (available_names.has(alt_names[idx])) {
metadata_name = alt_names[idx];
break;
}
}
}
return metadata_name;
Expand Down

0 comments on commit 00a98f2

Please sign in to comment.