Skip to content

Commit

Permalink
Bug 1337358 - Converts for(...; ...; ...) loops to use the new range-…
Browse files Browse the repository at this point in the history
…based loops in C++11 in tools/ r=froydnj

MozReview-Commit-ID: GdeCzDXjzzg

--HG--
extra : rebase_source : b00971238ff78d23d9bcec31f905ec268a614527
  • Loading branch information
sylvestre committed Feb 8, 2017
1 parent 2ca7897 commit 5941aa8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/power/rapl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -719,8 +719,8 @@ Finish()
// |n - 1|, and would be appropriate if we were using a random sample of a
// larger population.
double sumOfSquaredDeviations = 0;
for (auto iter = gTotals_W.begin(); iter != gTotals_W.end(); ++iter) {
double deviation = (*iter - mean);
for (double & iter : gTotals_W) {
double deviation = (iter - mean);
sumOfSquaredDeviations += deviation * deviation;
}
double popStdDev = sqrt(sumOfSquaredDeviations / n);
Expand Down

0 comments on commit 5941aa8

Please sign in to comment.