Fix invalid cricket::SrtpStat::FailureKey::operator<() implementation.
If operator<(a, b) returns true, then it must not be the case that operator<(b, a) is true as well, but the old implementation would do exactly that if a={1, 0, 0} and b={0, 0, 1}, for example. Should fix e.g.: [004:555] Error(unittest_main.cc:40): c:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\xtree(1746) : Assertion failed: invalid operator< from http://chromegw/i/client.libjingle/builders/Win32%20Debug/builds/245/steps/libjingle_p2p_unittest/logs/stdio R=juberti@webrtc.org, mallinath@webrtc.org Review URL: https://webrtc-codereview.appspot.com/2054005 git-svn-id: http://webrtc.googlecode.com/svn/trunk@4561 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
parent
166991fa1f
commit
28ff3ee6aa
@ -271,7 +271,10 @@ class SrtpStat {
|
||||
error(in_error) {
|
||||
}
|
||||
bool operator <(const FailureKey& key) const {
|
||||
return ssrc < key.ssrc || mode < key.mode || error < key.error;
|
||||
return
|
||||
(ssrc < key.ssrc) ||
|
||||
(ssrc == key.ssrc && mode < key.mode) ||
|
||||
(ssrc == key.ssrc && mode == key.mode && error < key.error);
|
||||
}
|
||||
uint32 ssrc;
|
||||
SrtpFilter::Mode mode;
|
||||
|
Loading…
x
Reference in New Issue
Block a user