diff --git a/.gn b/.gn index 3ff65c14c1..09f1b650a1 100644 --- a/.gn +++ b/.gn @@ -68,12 +68,6 @@ default_args = { android32_ndk_api_level = 16 android64_ndk_api_level = 21 - # WebRTC does not want to switch to C++14 yet. - use_cxx11 = true - - # WebRTC relies on Chromium's Android test infrastructure. - use_cxx11_on_android = false - # WebRTC does not provide the gflags dependency. Because libyuv uses it only # for unittests, it can be disabled (see third_party/libyuv/BUILD.gn) libyuv_use_gflags = false diff --git a/pc/peer_connection.cc b/pc/peer_connection.cc index 47825dc98b..0b943b5163 100644 --- a/pc/peer_connection.cc +++ b/pc/peer_connection.cc @@ -3900,17 +3900,11 @@ PeerConnection::GetFirstAudioTransceiver() const { bool PeerConnection::StartRtcEventLog(std::unique_ptr output, int64_t output_period_ms) { - // TODO(eladalon): In C++14, this can be done with a lambda. - struct Functor { - bool operator()() { - return pc->StartRtcEventLog_w(std::move(output), output_period_ms); - } - PeerConnection* const pc; - std::unique_ptr output; - const int64_t output_period_ms; - }; return worker_thread()->Invoke( - RTC_FROM_HERE, Functor{this, std::move(output), output_period_ms}); + RTC_FROM_HERE, + [this, output = std::move(output), output_period_ms]() mutable { + return StartRtcEventLog_w(std::move(output), output_period_ms); + }); } bool PeerConnection::StartRtcEventLog(