Skip to content

Commit

Permalink
Merge pull request #2515 from dtcenter/feature_2474_sonarqube_finding…
Browse files Browse the repository at this point in the history
…s_vector

Feature 2474 sonarqube findings at MTD
  • Loading branch information
hsoh-u authored Apr 20, 2023
2 parents 0071adf + 60dcd4e commit 22fbca7
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/tools/other/mode_time_domain/3d_conv.cc
Original file line number Diff line number Diff line change
Expand Up @@ -529,6 +529,7 @@ void get_data_plane(const MtdFloatFile & mtd, const int t, double * data_plane,
{

int x, y;
int offset = 0;
double * d = data_plane;
bool * ok = ok_plane;
double value;
Expand All @@ -547,9 +548,13 @@ for (y=0; y<ny; ++y) {

status = is_bad_data(value);

*d++ = (float) value;
if (offset < (nx * ny)) { // kludge for SonarQube findings
*(d+offset) = (float) value;

*ok++ = ! status;
*(ok+offset) = ! status;
}

offset++;

}

Expand Down

0 comments on commit 22fbca7

Please sign in to comment.