1
0
mirror of https://github.com/google/benchmark.git synced 2025-03-29 13:30:38 +08:00

Some small clang-tidy fixes ()

This commit is contained in:
Dominic Hamon 2018-01-29 08:38:47 -08:00 committed by GitHub
parent 4fe0206b65
commit df415adb2a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -30,7 +30,7 @@ auto StatisticsSum = [](const std::vector<double>& v) {
};
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 @@ auto Sqrt = [](const double dat) {
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)