From 0dc47882cb23139792d813a375c7add2ae5c1283 Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 17 Aug 2024 15:20:13 +0200 Subject: [PATCH] code hygiene: use std::swap instead of temporary variable Signed-off-by: Berthold Stoeger --- core/profile.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/core/profile.cpp b/core/profile.cpp index 2256780a8..c13e6e774 100644 --- a/core/profile.cpp +++ b/core/profile.cpp @@ -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;