Use std::min and std::max instead of self-defined functions such as rtc::_min/_max.
R=tommi@webrtc.org Review URL: https://webrtc-codereview.appspot.com/35079004 Cr-Commit-Position: refs/heads/master@{#8347} git-svn-id: http://webrtc.googlecode.com/svn/trunk@8347 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -11,6 +11,7 @@
|
||||
#ifndef WEBRTC_BASE_ROLLINGACCUMULATOR_H_
|
||||
#define WEBRTC_BASE_ROLLINGACCUMULATOR_H_
|
||||
|
||||
#include <algorithm>
|
||||
#include <vector>
|
||||
|
||||
#include "webrtc/base/common.h"
|
||||
@ -99,7 +100,7 @@ class RollingAccumulator {
|
||||
"It shouldn't be possible for max_stale_ && count_ == 0");
|
||||
max_ = samples_[next_index_];
|
||||
for (size_t i = 1u; i < count_; i++) {
|
||||
max_ = _max(max_, samples_[(next_index_ + i) % max_count()]);
|
||||
max_ = std::max(max_, samples_[(next_index_ + i) % max_count()]);
|
||||
}
|
||||
max_stale_ = false;
|
||||
}
|
||||
@ -112,7 +113,7 @@ class RollingAccumulator {
|
||||
"It shouldn't be possible for min_stale_ && count_ == 0");
|
||||
min_ = samples_[next_index_];
|
||||
for (size_t i = 1u; i < count_; i++) {
|
||||
min_ = _min(min_, samples_[(next_index_ + i) % max_count()]);
|
||||
min_ = std::min(min_, samples_[(next_index_ + i) % max_count()]);
|
||||
}
|
||||
min_stale_ = false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user