Some small clang-tidy fixes (#520)
diff --git a/src/statistics.cc b/src/statistics.cc index 5932ad4..d284367 100644 --- a/src/statistics.cc +++ b/src/statistics.cc
@@ -30,7 +30,7 @@ }; double StatisticsMean(const std::vector<double>& v) { - if (v.size() == 0) return 0.0; + if (v.empty()) return 0.0; return StatisticsSum(v) * (1.0 / v.size()); } @@ -62,7 +62,7 @@ double StatisticsStdDev(const std::vector<double>& v) { const auto mean = StatisticsMean(v); - if (v.size() == 0) return mean; + if (v.empty()) return mean; // Sample standard deviation is undefined for n = 1 if (v.size() == 1)