cleanup: use std::size() instead of arithmetics

Signed-off-by: Berthold Stoeger <bstoeger@mail.tuwien.ac.at>
This commit is contained in:
Berthold Stoeger 2022-09-24 19:36:42 +02:00
parent e2338fe7e9
commit f407f5269a

View file

@ -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;