mrc-ide / covid-sim

This is the COVID-19 CovidSim microsimulation model developed by the MRC Centre for Global Infectious Disease Analysis hosted at Imperial College, London.
GNU General Public License v3.0
1.23k stars 256 forks source link

Unclear code (unnecessary braces) in Update.cpp: DoInfect #482

Closed AndreyKarpov closed 3 years ago

AndreyKarpov commented 3 years ago

Hello. We accidentally found a new bug.

https://github.com/mrc-ide/covid-sim/blob/a5d2a0b981aca828f20938cea249ba66b4d1c682/src/Update.cpp#L123-L124

Details: Example of How New Diagnostics Appear in PVS-Studio.

weshinsley commented 3 years ago

Good spot - I think that's just redundant bracketing - not a bug.

weshinsley commented 3 years ago

Removed unnecessary braces in PR #483