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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user