forked from webrtc-sdk/webrtc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Before this CL, the StreamId class represented either a valid SCTP stream ID, or "nothing", which means that it was a wrapped absl::optional. Since created data channels don't have a SCTP stream ID until it's known whether this peer will use odd or even numbers, the "nothing" value was used for that state. This unfortunately made it a bit hard to work with objects of this type, as one always had to check if it contained a value. And even if a caller would check this, and then pass the StreamId to a different function, that function would have to do the check itself (often as a RTC_DCHECK) since the passed StreamId always could have that state. This CL simply extracts the "absl::optional" part of it, forcing holders to wrap it in an optional type - when it can be "nothing". But allowing the other code to just pass StreamId that can't be "nothing". That simplifies the code a bit, potentially removing some bugs. Bug: chromium:41221056 Change-Id: I93104cdd5d2f5fc1dbeb9d9dfc4cf361f11a9d68 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/342440 Reviewed-by: Florent Castelli <[email protected]> Reviewed-by: Tomas Gunnarsson <[email protected]> Commit-Queue: Victor Boivie <[email protected]> Cr-Commit-Position: refs/heads/main@{#41880}
- Loading branch information
Victor Boivie
authored and
WebRTC LUCI CQ
committed
Mar 12, 2024
1 parent
b4913a5
commit cd3d29b
Showing
8 changed files
with
84 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.