mirror of
https://github.com/subsurface/subsurface.git
synced 2025-02-19 22:16:15 +00:00
core: add default initialization to sruct deco_state
Don't memset() to clear deco_state, use assignment of default constructed object (or better yet: just default construct). Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
f18acf6fb9
commit
2b3d2f1020
3 changed files with 25 additions and 26 deletions
|
|
@ -503,7 +503,7 @@ void clear_deco(struct deco_state *ds, double surface_pressure, bool in_planner)
|
|||
{
|
||||
int ci;
|
||||
|
||||
memset(ds, 0, sizeof(*ds));
|
||||
*ds = deco_state();
|
||||
clear_vpmb_state(ds);
|
||||
for (ci = 0; ci < 16; ci++) {
|
||||
ds->tissue_n2_sat[ci] = (surface_pressure - ((in_planner && (decoMode(true) == VPMB)) ? WV_PRESSURE_SCHREINER : WV_PRESSURE)) * N2_IN_AIR / 1000;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue