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}
diff --git a/modules/video_coding/frame_object.cc b/modules/video_coding/frame_object.cc
index 4f5f9d4..1e0b647 100644
--- a/modules/video_coding/frame_object.cc
+++ b/modules/video_coding/frame_object.cc
@@ -73,9 +73,7 @@
// 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 !=