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 df20ba4
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
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
6 changes: 3 additions & 3 deletions vpkt.cc
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ void add_to_vspecpol(const Packet &vpkt, const int obsdirindex, const int opacho
}

// Routine to add a packet to the outcoming spectrum.
void add_to_vpkt_grid(const Packet &vpkt, const std::array<double, 3> vel, const int wlbin, const int obsdirindex,
const std::array<double, 3> obs) {
void add_to_vpkt_grid(const Packet &vpkt, const std::array<double, 3> &vel, const int wlbin, const int obsdirindex,
const std::array<double, 3> &obs) {
double vref1{NAN};
double vref2{NAN};

Expand Down Expand Up @@ -160,7 +160,7 @@ void add_to_vpkt_grid(const Packet &vpkt, const std::array<double, 3> vel, const
}

auto rlc_emiss_vpkt(const Packet &pkt, const double t_current, const double t_arrive, const double nu_rf,
const double e_rf, const int obsdirindex, const std::array<double, 3> obsdir,
const double e_rf, const int obsdirindex, const std::array<double, 3> &obsdir,
const enum packet_type type_before_rpkt, std::stringstream &vpkt_contrib_row) -> bool {
int mgi = 0;

Expand Down

0 comments on commit df20ba4

Please sign in to comment.