Simplify initialization of test FrameGeneratorCapturerConfig.
Allowing assignment of the AutoOpt fields: AutoOpt<T> field = T(); Bug: webrtc:9883 Change-Id: I3fd73d29b4d8c6c6b72ae9ed5fb9511ae98af95e Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/169558 Reviewed-by: Per Kjellander <perkj@webrtc.org> Commit-Queue: Sebastian Jansson <srte@webrtc.org> Cr-Commit-Position: refs/heads/master@{#30674}
This commit is contained in:

committed by
Commit Bot

parent
a598fafa41
commit
5e1ea25189
@ -29,6 +29,7 @@ namespace frame_gen_cap_impl {
|
||||
template <typename T>
|
||||
class AutoOpt : public absl::optional<T> {
|
||||
public:
|
||||
using absl::optional<T>::optional;
|
||||
T* operator->() {
|
||||
if (!absl::optional<T>::has_value())
|
||||
this->emplace(T());
|
||||
|
Reference in New Issue
Block a user