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:
@ -14,6 +14,7 @@
|
||||
#include <limits.h>
|
||||
#include <math.h>
|
||||
|
||||
#include <algorithm>
|
||||
#include <iomanip>
|
||||
#include <sstream>
|
||||
#include <string>
|
||||
@ -94,8 +95,8 @@ class Candidate {
|
||||
// Limiting priority to UINT_MAX when value exceeds uint32 max.
|
||||
// This can happen for e.g. when preference = 3.
|
||||
uint64 prio_val = static_cast<uint64>(preference * 127) << 24;
|
||||
priority_ = static_cast<uint32>(
|
||||
rtc::_min(prio_val, static_cast<uint64>(UINT_MAX)));
|
||||
priority_ =
|
||||
static_cast<uint32>(std::min(prio_val, static_cast<uint64>(UINT_MAX)));
|
||||
}
|
||||
|
||||
const std::string & username() const { return username_; }
|
||||
|
||||
Reference in New Issue
Block a user