Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(520)

Unified Diff: webrtc/modules/video_coding/utility/moving_average.h

Issue 1528503003: Lint enabled for webrtc/modules/video_coding folder. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase Created 5 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/utility/moving_average.h
diff --git a/webrtc/modules/video_coding/utility/moving_average.h b/webrtc/modules/video_coding/utility/moving_average.h
index 8de1dd2a4377fb67e491316ede3173a4141f3b03..494bfd51fbc45630a3f1ce588f626ff5a9852990 100644
--- a/webrtc/modules/video_coding/utility/moving_average.h
+++ b/webrtc/modules/video_coding/utility/moving_average.h
@@ -16,7 +16,7 @@
#include "webrtc/typedefs.h"
namespace webrtc {
-template<class T>
+template <class T>
class MovingAverage {
public:
MovingAverage();
@@ -30,17 +30,17 @@ class MovingAverage {
std::list<T> samples_;
};
-template<class T>
-MovingAverage<T>::MovingAverage() : sum_(static_cast<T>(0)) {
-}
+template <class T>
+MovingAverage<T>::MovingAverage()
+ : sum_(static_cast<T>(0)) {}
-template<class T>
+template <class T>
void MovingAverage<T>::AddSample(T sample) {
samples_.push_back(sample);
sum_ += sample;
}
-template<class T>
+template <class T>
bool MovingAverage<T>::GetAverage(size_t num_samples, T* avg) {
if (num_samples > samples_.size())
return false;
@@ -55,13 +55,13 @@ bool MovingAverage<T>::GetAverage(size_t num_samples, T* avg) {
return true;
}
-template<class T>
+template <class T>
void MovingAverage<T>::Reset() {
sum_ = static_cast<T>(0);
samples_.clear();
}
-template<class T>
+template <class T>
int MovingAverage<T>::size() {
return samples_.size();
}
« no previous file with comments | « webrtc/modules/video_coding/utility/mock/mock_frame_dropper.h ('k') | webrtc/modules/video_coding/utility/quality_scaler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698