18
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-12-03 10:05:23 +01:00

fix: SonarQube reliability finding of the buffer stops report

The lambda that writes the buffer stop cell captured the notice by reference, which the analyser took for a
possible null dereference; it now captures the values it needs explicitly. A dead store of the frame-hit loop
removed.
This commit is contained in:
jerrrrycho
2026-12-03 06:48:14 +01:00
parent 885c28c1ef
commit 174de5921d
2 changed files with 5 additions and 4 deletions
-1
View File
@@ -447,7 +447,6 @@ contact_result contact(definition const &Stop, state &Stop_state, contact_input
result.travel += hit.crush1 + hit.crush2;
result.duration = std::min(Input.dt, result.duration + hit.duration);
velocity = hit.velocity;
time = Input.dt;
if (climbs(vehiclecrush)) {
auto const climbed{after_override(Stop, now, Input.mass, velocity)};
result.climbed = true;