code hygiene: use std::swap instead of temporary variable

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2024-08-17 15:20:13 +02:00 committed by bstoeger
parent bdfd37c95b
commit 0dc47882cb

View file

@ -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;
if (t0 > t1) {
report_info("non-monotonous dive stamps %d %d", t0, t1);
int xchg = t1;
t1 = t0;
t0 = xchg;
std::swap(t0, t1);
}
if (t0 != t1 && t1 - t0 < time_stepsize)
time_stepsize = t1 - t0;