From 5af3051f8419f5366266cee3a12ee4ec985bb4ad Mon Sep 17 00:00:00 2001 From: Mirko Bonadei Date: Fri, 7 Sep 2018 22:15:07 +0200 Subject: [PATCH] Fix no_exit_time_destructors in ortc. Non trivially destructible objects with static storage are disallowed by the style guide. This CL just removes 'static' since these objects are constructed once or twice in the entire application. Bug: webrtc:9693 Change-Id: I7509e2c088dd5ec0ac13f08053ecb76cf8259d90 Reviewed-on: https://webrtc-review.googlesource.com/98840 Commit-Queue: Mirko Bonadei Reviewed-by: Steve Anton Cr-Commit-Position: refs/heads/master@{#24634} --- ortc/BUILD.gn | 1 - ortc/rtptransportcontrolleradapter.cc | 5 ++--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/ortc/BUILD.gn b/ortc/BUILD.gn index be7b1fbdec..d0fb00f5ca 100644 --- a/ortc/BUILD.gn +++ b/ortc/BUILD.gn @@ -14,7 +14,6 @@ if (is_android) { rtc_static_library("ortc") { defines = [] - configs += [ "..:no_exit_time_destructors" ] sources = [ "ortcfactory.cc", "ortcfactory.h", diff --git a/ortc/rtptransportcontrolleradapter.cc b/ortc/rtptransportcontrolleradapter.cc index e4c9ea24d2..853adf1274 100644 --- a/ortc/rtptransportcontrolleradapter.cc +++ b/ortc/rtptransportcontrolleradapter.cc @@ -626,9 +626,8 @@ RtpTransportControllerAdapter::RtpTransportControllerAdapter( // currently reject empty lists of codecs. Note that these codecs will never // actually be used, because when parameters are set, the dummy codecs will // be replaced by actual codecs before any send/receive streams are created. - static const cricket::AudioCodec dummy_audio(0, cricket::kPcmuCodecName, 8000, - 0, 1); - static const cricket::VideoCodec dummy_video(96, cricket::kVp8CodecName); + const cricket::AudioCodec dummy_audio(0, cricket::kPcmuCodecName, 8000, 0, 1); + const cricket::VideoCodec dummy_video(96, cricket::kVp8CodecName); local_audio_description_.AddCodec(dummy_audio); remote_audio_description_.AddCodec(dummy_audio); local_video_description_.AddCodec(dummy_video);