Skip to content

Commit

Permalink
Fix clang-tidy issues raised in PLMC PR
Browse files Browse the repository at this point in the history
  • Loading branch information
bcaddy committed Jun 21, 2023
1 parent 266e51d commit 11b855f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/global/global.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ const std::set<const char *> optionalParams = {
int is_param_valid(const char *param_name)
{
// for (auto optionalParam = optionalParams.begin(); optionalParam != optionalParams.end(); ++optionalParam) {
for (auto optionalParam : optionalParams) {
for (const auto *optionalParam : optionalParams) {
if (strcmp(param_name, optionalParam) == 0) {
return 1;
}
Expand Down
8 changes: 4 additions & 4 deletions src/reconstruction/plmc_cuda_tests.cu
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ TEST(tHYDROPlmcReconstructor, CorrectInputExpectCorrectOutput)

// Setup host grid. Fill host grid with random values and randomly assign maximum value
std::vector<double> host_grid(nx * ny * nz * n_fields);
for (size_t i = 0; i < host_grid.size(); i++) {
host_grid.at(i) = doubleRand(prng);
for (Real &val : host_grid) {
val = doubleRand(prng);
}

// Allocating and copying to device
Expand Down Expand Up @@ -172,8 +172,8 @@ TEST(tMHDPlmcReconstructor, CorrectInputExpectCorrectOutput)

// Setup host grid. Fill host grid with random values and randomly assign maximum value
std::vector<double> host_grid(n_cells_grid);
for (size_t i = 0; i < host_grid.size(); i++) {
host_grid.at(i) = doubleRand(prng);
for (Real &val : host_grid) {
val = doubleRand(prng);
}

// Allocating and copying to device
Expand Down

0 comments on commit 11b855f

Please sign in to comment.