Skip to content

Commit

Permalink
Per #2402, define and use a new SemiLatLonData::clear() to avoid a So…
Browse files Browse the repository at this point in the history
…narQube finding.
  • Loading branch information
JohnHalleyGotway committed Feb 16, 2023
1 parent 35c186d commit f1e61fe
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 1 deletion.
17 changes: 17 additions & 0 deletions src/libcode/vx_grid/grid_base.cc
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,23 @@ mlog << Debug(grid_debug_level)
}


////////////////////////////////////////////////////////////////////////


void SemiLatLonData::clear()

{

name = (const char *) 0;

lats.clear();
lons.clear();
levels.clear();
times.clear();

}


////////////////////////////////////////////////////////////////////////


Expand Down
2 changes: 1 addition & 1 deletion src/libcode/vx_grid/semilatlon_grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,7 @@ IsLatLon = false;
Nx = 0;
Ny = 0;

memset(&Data, 0, sizeof(Data));
Data.clear();

return;

Expand Down
1 change: 1 addition & 0 deletions src/libcode/vx_grid/semilatlon_grid_defs.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ struct SemiLatLonData {
NumArray times;

void dump();
void clear();
};


Expand Down

0 comments on commit f1e61fe

Please sign in to comment.