Skip to content

Commit ac1ecdf

Browse files
committed
Check "nj > 0" at the caller
We do not want to call "evaluate_gravity" when "nj==0". The check for this is now made at the caller, not at the callee.
1 parent c85271f commit ac1ecdf

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/sapporo_light/sapporo.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ void sapporo::calc_firsthalf(int cluster_id,
151151
acc_j.clear();
152152
jrk_j.clear();
153153
}
154-
evaluate_gravity(ni, nj);
154+
if (nj > 0) {
155+
evaluate_gravity(ni, nj);
156+
}
155157

156158
}
157159

0 commit comments

Comments
 (0)