From 66c4b4711233da7d838f596f99def0d4ca686dba Mon Sep 17 00:00:00 2001 From: Guillaume PIERRE Date: Fri, 27 Dec 2024 18:00:48 +0100 Subject: [PATCH] New hydro remix : use of std::ranges --- src/solver/simulation/hydro-remix-new.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/solver/simulation/hydro-remix-new.cpp b/src/solver/simulation/hydro-remix-new.cpp index 9de0690b4d..d890ff35f9 100644 --- a/src/solver/simulation/hydro-remix-new.cpp +++ b/src/solver/simulation/hydro-remix-new.cpp @@ -237,14 +237,11 @@ RemixHydroOutput new_remix_hydro(const std::vector& G, if (idx_creux < idx_pic) { max_pic = capa; - max_creux = *std::min_element(intermediate_level.begin(), - intermediate_level.end()); + max_creux = *std::ranges::min_element(intermediate_level); } else { - max_pic = capa - - *std::max_element(intermediate_level.begin(), - intermediate_level.end()); + max_pic = capa - *std::ranges::max_element(intermediate_level); max_creux = capa; }