Apply clang-format to source tree
[alexxy/gromacs.git] / src / gromacs / analysisdata / modules / frameaverager.cpp
index 53ffd297c94e0811fb6dae27be8e27adc0608c92..1ba439212c59b68eb419c35dad8d896086c41ab4 100644 (file)
@@ -1,7 +1,7 @@
 /*
  * This file is part of the GROMACS molecular simulation package.
  *
- * Copyright (c) 2013,2014, by the GROMACS development team, led by
+ * Copyright (c) 2013,2014,2019, by the GROMACS development team, led by
  * Mark Abraham, David van der Spoel, Berk Hess, and Erik Lindahl,
  * and including many others, as listed in the AUTHORS file in the
  * top-level source directory and at http://www.gromacs.org.
@@ -52,21 +52,20 @@ namespace gmx
 void AnalysisDataFrameAverager::setColumnCount(int columnCount)
 {
     GMX_RELEASE_ASSERT(columnCount >= 0, "Invalid column count");
-    GMX_RELEASE_ASSERT(values_.empty(),
-                       "Cannot initialize multiple times");
+    GMX_RELEASE_ASSERT(values_.empty(), "Cannot initialize multiple times");
     values_.resize(columnCount);
 }
 
 void AnalysisDataFrameAverager::addValue(int index, real value)
 {
-    AverageItem &item  = values_[index];
+    AverageItemitem  = values_[index];
     const double delta = value - item.average;
-    item.samples    += 1;
-    item.average    += delta / item.samples;
+    item.samples += 1;
+    item.average += delta / item.samples;
     item.squaredSum += delta * (value - item.average);
 }
 
-void AnalysisDataFrameAverager::addPoints(const AnalysisDataPointSetRef &points)
+void AnalysisDataFrameAverager::addPoints(const AnalysisDataPointSetRefpoints)
 {
     const int firstColumn = points.firstColumn();
     GMX_ASSERT(static_cast<size_t>(firstColumn + points.columnCount()) <= values_.size(),
@@ -78,7 +77,6 @@ void AnalysisDataFrameAverager::addPoints(const AnalysisDataPointSetRef &points)
             addValue(firstColumn + i, points.y(i));
         }
     }
-
 }
 
 void AnalysisDataFrameAverager::finish()