From f407f5269a8033b40957faaae64eff0cfea5c6ce Mon Sep 17 00:00:00 2001 From: Berthold Stoeger Date: Sat, 24 Sep 2022 19:36:42 +0200 Subject: [PATCH] cleanup: use std::size() instead of arithmetics Signed-off-by: Berthold Stoeger --- core/qthelper.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/qthelper.cpp b/core/qthelper.cpp index 1682db44b..369d12bc3 100644 --- a/core/qthelper.cpp +++ b/core/qthelper.cpp @@ -676,7 +676,7 @@ QString get_water_type_string(int salinity) QStringList getWaterTypesAsString() { QStringList res; - res.reserve(std::end(waterTypes) - std::begin(waterTypes)); // Waiting for C++17's std::size() + res.reserve(std::size(waterTypes)); for (const char *t: waterTypes) res.push_back(gettextFromC::tr(t)); return res;