From 5e1ea251895c08fbc48cb595b02f9257cedeac75 Mon Sep 17 00:00:00 2001 From: Sebastian Jansson Date: Tue, 3 Mar 2020 16:29:06 +0100 Subject: [PATCH] Simplify initialization of test FrameGeneratorCapturerConfig. Allowing assignment of the AutoOpt fields: AutoOpt field = T(); Bug: webrtc:9883 Change-Id: I3fd73d29b4d8c6c6b72ae9ed5fb9511ae98af95e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169558 Reviewed-by: Per Kjellander Commit-Queue: Sebastian Jansson Cr-Commit-Position: refs/heads/master@{#30674} --- test/frame_generator_capturer.h | 1 + 1 file changed, 1 insertion(+) diff --git a/test/frame_generator_capturer.h b/test/frame_generator_capturer.h index fcd5f9631f..fd376e2d6f 100644 --- a/test/frame_generator_capturer.h +++ b/test/frame_generator_capturer.h @@ -29,6 +29,7 @@ namespace frame_gen_cap_impl { template class AutoOpt : public absl::optional { public: + using absl::optional::optional; T* operator->() { if (!absl::optional::has_value()) this->emplace(T());