From: Gregor Jasny Date: Wed, 7 Jun 2023 19:11:51 +0000 (+0200) Subject: refactor: Use std::size to compute array size (#1297) X-Git-Tag: v4.8.2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e658c34affb62d1969ca139268bd64f813c36b00;p=thirdparty%2Fccache.git refactor: Use std::size to compute array size (#1297) --- diff --git a/src/core/Statistics.cpp b/src/core/Statistics.cpp index fefe8eb8f..f3b1d72de 100644 --- a/src/core/Statistics.cpp +++ b/src/core/Statistics.cpp @@ -253,7 +253,7 @@ const StatisticsField k_statistics_fields[] = { // since they are not interesting to show. }; -static_assert(sizeof(k_statistics_fields) / sizeof(k_statistics_fields[0]) +static_assert(std::size(k_statistics_fields) == static_cast(Statistic::END) - (/*none*/ 1 + /*subdir files*/ 16 + /*subdir size*/ 16));