Commit Graph

6 Commits

Author SHA1 Message Date
452ea0d4d9 Workaround VC++ 2017 template bug
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}
2017-08-09 17:00:11 +00:00
7956c0f2f6 Implemented a new sequence number unwrapper in sequence_number_util.h.
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}
2017-07-26 14:48:15 +00:00
c20978e581 Rename webrtc/base -> webrtc/rtc_base
NOPRESUBMIT=True # cpplint errors that aren't caused by this CL.
NOTRY=True
NOTREECHECKS=True
TBR=kwiberg@webrtc.org, kjellander@webrtc.org

Bug: webrtc:7634
Change-Id: I3cca0fbaa807b563c95979cccd6d1bec32055f36
Reviewed-on: https://chromium-review.googlesource.com/562156
Commit-Queue: Edward Lemur <ehmaldonado@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#18919}
2017-07-06 19:11:40 +00:00
dca1e09db7 Revert "Update includes for webrtc/{base => rtc_base} rename (1/3)"
This reverts commit c8fa692ec44fd6ba4fa3d085ac3161a262fc18c5.

BUG=webrtc:7634
NOTRY=True
NOPRESUBMIT=True

Review-Url: https://codereview.webrtc.org/2964773002 .
Cr-Commit-Position: refs/heads/master@{#18872}
2017-07-01 14:42:25 +00:00
c8fa692ec4 Update includes for webrtc/{base => rtc_base} rename (1/3)
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}
2017-06-30 21:02:00 +00:00
2cb73413f4 Moved sequence number specific operations from mod_ops.h
to sequence_number_util.h

Also in this CL:
  - Implemented a MinDiff function which finds the smallest diff of two
    wrapping numbers.
  - Implemented comparators for sequence numbers.

BUG=
R=mflodman@webrtc.org, tommi@webrtc.org, torbjorng@webrtc.org

Review URL: https://codereview.webrtc.org/1814753002 .

Cr-Commit-Position: refs/heads/master@{#12083}
2016-03-22 09:03:55 +00:00