Remove rule that discourages passing optional by const reference

include example to demonstrate:
(subjectively) increased readability
(objectively) decreased binary size

Bug: None
Change-Id: I970e668af98d98725b2d527f44169a8b7c9d2338
Reviewed-on: https://webrtc-review.googlesource.com/c/121420
Commit-Queue: Danil Chapovalov <danilchap@webrtc.org>
Reviewed-by: Karl Wiberg <kwiberg@webrtc.org>
Reviewed-by: Johannes Kron <kron@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#26545}
This commit is contained in:
Danil Chapovalov
2019-02-05 11:32:19 +01:00
committed by Commit Bot
parent 681de2036b
commit b769894025
14 changed files with 31 additions and 47 deletions

View File

@ -73,9 +73,7 @@ RtpFrameObject::RtpFrameObject(PacketBuffer* packet_buffer,
// frame (I-frame or IDR frame in H.264 (AVC), or an IRAP picture in H.265
// (HEVC)).
rotation_ = last_packet->video_header.rotation;
SetColorSpace(last_packet->video_header.color_space
? &last_packet->video_header.color_space.value()
: nullptr);
SetColorSpace(last_packet->video_header.color_space);
_rotation_set = true;
content_type_ = last_packet->video_header.content_type;
if (last_packet->video_header.video_timing.flags !=