mirror of
https://github.com/subsurface/subsurface.git
synced 2024-12-01 06:30:26 +00:00
code hygiene: use std::swap instead of temporary variable
Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
parent
bdfd37c95b
commit
0dc47882cb
1 changed files with 1 additions and 3 deletions
|
@ -883,9 +883,7 @@ static void calculate_deco_information(struct deco_state *ds, const struct deco_
|
||||||
entry.gfline = get_gf(ds, entry.ambpressure, dive) * (100.0 - AMB_PERCENTAGE) + AMB_PERCENTAGE;
|
entry.gfline = get_gf(ds, entry.ambpressure, dive) * (100.0 - AMB_PERCENTAGE) + AMB_PERCENTAGE;
|
||||||
if (t0 > t1) {
|
if (t0 > t1) {
|
||||||
report_info("non-monotonous dive stamps %d %d", t0, t1);
|
report_info("non-monotonous dive stamps %d %d", t0, t1);
|
||||||
int xchg = t1;
|
std::swap(t0, t1);
|
||||||
t1 = t0;
|
|
||||||
t0 = xchg;
|
|
||||||
}
|
}
|
||||||
if (t0 != t1 && t1 - t0 < time_stepsize)
|
if (t0 != t1 && t1 - t0 < time_stepsize)
|
||||||
time_stepsize = t1 - t0;
|
time_stepsize = t1 - t0;
|
||||||
|
|
Loading…
Reference in a new issue