Skip to content

Commit

Permalink
MET #2897, don’t waste time searching, just set the index to n - 1
Browse files Browse the repository at this point in the history
  • Loading branch information
JohnHalleyGotway authored May 22, 2024
1 parent 2b03ef8 commit 20dec3b
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/libcode/vx_pointdata_python/python_pointdata.cc
Original file line number Diff line number Diff line change
Expand Up @@ -350,9 +350,10 @@ bool process_point_data_list(PyObject *python_point_data, MetPointDataPython &me
// get valid time index
vld_time = obs.getValidTime();
if ( !header_data->vld_num_array.has(vld_time, vld_idx) ) {
header_data->vld_num_array.add(vld_time);
// MET #2897 keep vld_array and vld_num_array in sync
header_data->vld_array.add(obs.getValidTimeString());
header_data->vld_num_array.has(vld_time, vld_idx);
header_data->vld_num_array.add(vld_time);
vld_idx = header_data->vld_num_array.n() - 1;
}

if (!is_eq(prev_lat, lat) || !is_eq(prev_lon, lon) || !is_eq(prev_elv, elv)
Expand Down

0 comments on commit 20dec3b

Please sign in to comment.