mirror of
https://github.com/subsurface/subsurface.git
synced 2024-11-30 22:20:21 +00:00
refactor: revert questionable optimisation
Reverted "optimisation" based on code feedback. Firstly, it's implementation-defined whether or not a stack frame is created for sub-scopes, secondly any optimisation is questionable regardless, and thirdly it was felt that it makes the code harder to understand. Signed-off-by: Micha WERLE <micha@michaelwerle.com>
This commit is contained in:
parent
c7171179b3
commit
d0b95f9401
1 changed files with 1 additions and 1 deletions
|
@ -117,11 +117,11 @@ static int parse_gasmixes(device_data_t *devdata, struct dive *dive, dc_parser_t
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
bool no_volume = true;
|
bool no_volume = true;
|
||||||
cylinder_t cyl = empty_cylinder;
|
|
||||||
struct gasmix last_mix = gasmix_air; /* default to air */
|
struct gasmix last_mix = gasmix_air; /* default to air */
|
||||||
|
|
||||||
clear_cylinder_table(&dive->cylinders);
|
clear_cylinder_table(&dive->cylinders);
|
||||||
for (i = 0; i < MAX(ngases, ntanks); i++) {
|
for (i = 0; i < MAX(ngases, ntanks); i++) {
|
||||||
|
cylinder_t cyl = empty_cylinder;
|
||||||
cyl = empty_cylinder;
|
cyl = empty_cylinder;
|
||||||
if (i < ngases) {
|
if (i < ngases) {
|
||||||
dc_gasmix_t gasmix = { 0 };
|
dc_gasmix_t gasmix = { 0 };
|
||||||
|
|
Loading…
Reference in a new issue