When compiling webrtc's call.cc with VC++ 2017 (is_clang = false) the
following compile error occurs:
sequence_number_util.h(90): error C2672: 'rtc::SafeLt': no matching
overloaded function found
note: see reference to class template instantiation
'webrtc::SeqNumUnwrapper<T,M>' being compiled
This error is not associated with any particular instantiation of
SeqNumUnwrapper (there isn't one) and this undefined nature of 'T' seems
to be what confuses the compiler. When it tries to locate SafeLt for an
undefined type 'T' it gets confused.
SafeLt is unnecessary in this context and changing it to use the '<'
operator directly avoids the problem.
The bug has been reported to Microsoft.
BUG=chromium:753488
Review-Url: https://codereview.webrtc.org/2997623002
Cr-Commit-Position: refs/heads/master@{#19292}
There is already an Unwrapper in webrtc/modules/include/module_common_types.h,
but we reimplemented it in sequence_number_util.h for a few reasons:
- Such a class belongs in sequence_number_util.h.
- It is a cleaner implementation since we can use the rest of
sequence_number_util.h functionality.
- You can choose at which number the unwrapped sequence should start,
which is used to avoid the edge case when a backward wrap can happen
as the first few numbers are unwrapped.
- This unwrapper can unwrap numbers that does not wrap 8/16/32 bits.
BUG=None
Review-Url: https://codereview.webrtc.org/2977603002
Cr-Commit-Position: refs/heads/master@{#19154}
I used a command like this to update the paths:
perl -pi -e "s/webrtc\/base/webrtc\/rtc_base/g" `find webrtc/rtc_base -name "*.cc" -o -name "*.h"`
The only manual edit is to add an include of webrtc/rtc_base/checks.h in
webrtc/modules/audio_device/android/opensles_common.h, which likely
was needed due to changed include paths due to 'git cl format'.
BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True
Review-Url: https://codereview.webrtc.org/2969653002
Cr-Commit-Position: refs/heads/master@{#18871}