| Index: webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
|
| diff --git a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
|
| index 15e759b65466a425515f7243eeaf2414775a4020..1361277508f3a06be07c195891a0d1b05b739b09 100644
|
| --- a/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
|
| +++ b/webrtc/modules/remote_bitrate_estimator/test/bwe_test_framework.cc
|
| @@ -15,6 +15,7 @@
|
| #include <sstream>
|
|
|
| #include "webrtc/base/constructormagic.h"
|
| +#include "webrtc/base/safe_minmax.h"
|
|
|
| namespace webrtc {
|
| namespace testing {
|
| @@ -406,8 +407,8 @@ namespace {
|
| inline int64_t TruncatedNSigmaGaussian(Random* const random,
|
| int64_t mean,
|
| int64_t std_dev) {
|
| - int64_t gaussian_random = random->Gaussian(mean, std_dev);
|
| - return std::max(std::min(gaussian_random, kN * std_dev), -kN * std_dev);
|
| + const int64_t gaussian_random = random->Gaussian(mean, std_dev);
|
| + return rtc::SafeClamp(gaussian_random, -kN * std_dev, kN * std_dev);
|
| }
|
| }
|
|
|
|
|