Skip to content

Commit

Permalink
Some small clang-tidy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
dmah42 committed Jan 29, 2018
1 parent 4fe0206 commit c836e97
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/statistics.cc
Expand Up @@ -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());
}

Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit c836e97

Please sign in to comment.