]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
refactor: Use std::size to compute array size (#1297)
authorGregor Jasny <gjasny@googlemail.com>
Wed, 7 Jun 2023 19:11:51 +0000 (21:11 +0200)
committerGitHub <noreply@github.com>
Wed, 7 Jun 2023 19:11:51 +0000 (21:11 +0200)
src/core/Statistics.cpp

index fefe8eb8fcb45bf33c73e632c94b4710b5ae7279..f3b1d72de6590a81291fb28baf9bfd75cff8337d 100644 (file)
@@ -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<size_t>(Statistic::END)
                    - (/*none*/ 1 + /*subdir files*/ 16 + /*subdir size*/ 16));