Skip to content

Commit

Permalink
Fix cppcheck 2.15.0 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
lukeshingles committed Sep 1, 2024
1 parent fe38c4a commit f6c59c5
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 3 additions & 3 deletions grid.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1505,10 +1505,10 @@ auto get_poscoordpointnum(const double pos, const double time, const int axis) -
return n_r;
}
}
assert_always(false);
} else {
assert_always(false);
}

assert_always(false);
return -1;
}

constexpr auto get_gridcoords_from_xyz(const std::array<double, 3> pos_xyz) -> std::array<double, 3> {
Expand Down
6 changes: 5 additions & 1 deletion sn3d.h
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,11 @@ inline thread_local auto gslworkspace =
#ifdef __NVCOMPILER_CUDA_ARCH__
#define printout(...) printf(__VA_ARGS__)

#define __artis_assert(e) assert(e)
#define __artis_assert(e) \
{ \
const bool assertpass = static_cast<bool>(e); \
assert(assertpass) \
}

#else
inline void print_line_start() {
Expand Down

0 comments on commit f6c59c5

Please sign in to comment.