diff --git a/grid.cc b/grid.cc index 2cef7513e..48e5625d8 100644 --- a/grid.cc +++ b/grid.cc @@ -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 pos_xyz) -> std::array { diff --git a/sn3d.h b/sn3d.h index d679e82bb..f7c90777f 100644 --- a/sn3d.h +++ b/sn3d.h @@ -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(e); \ + assert(assertpass) \ + } #else inline void print_line_start() {