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 257 forks source link

Use enum struct for InfStat #416

Closed zlatanvasovic closed 4 years ago

zlatanvasovic commented 4 years ago

I think InfStat can be reworked to avoid using abs(InfStat::...), but I'd rather leave that for some next PR.

weshinsley commented 4 years ago

Also see PR #292 - which is replacing some of these comparisons with isDead() and isAlive() - that may also clarify things particularly in the cases where "> 0" type comparisons are done.

zlatanvasovic commented 4 years ago

@weshinsley @mstevens-uk I'd rather postpone further changes for the next PR, unless there is a clear way to avoid abs.

Ideally, the integer values and placeholders like Dead and Recovered should be removed altogether from InfStat, and replaced with a more idiomatic functionality.