Skip to content

Commit

Permalink
#1815 Do not call to_string
Browse files Browse the repository at this point in the history
  • Loading branch information
Howard Soh committed Jun 27, 2022
1 parent 9541e84 commit 2066939
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/libcode/vx_nc_util/nc_utils.cc
Original file line number Diff line number Diff line change
Expand Up @@ -3825,9 +3825,9 @@ int get_index_for_dim(NcVarInfo *vars, const string dim_name,
}

if (IS_VALID_NC_P(nc_var)) {
ConcatString value_str = (is_time && (value > 10000000.))
? unix_to_yyyymmdd_hhmmss(value)
: to_string(value).c_str();
ConcatString value_str;
if (is_time && (value > 10000000.)) value_str << unix_to_yyyymmdd_hhmmss(value);
else value_str << value;

offset = get_index_at_nc_data(nc_var, value, is_time);
if (offset == bad_data_int)
Expand Down

0 comments on commit 2066939

Please sign in to comment.