Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: webrtc/video/end_to_end_tests.cc

Issue 3003723002: Fix places that trigger no-unused-lambda-capture - change to using static-constexpr (Closed)
Patch Set: Rebased Created 3 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « webrtc/pc/channel_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/video/end_to_end_tests.cc
diff --git a/webrtc/video/end_to_end_tests.cc b/webrtc/video/end_to_end_tests.cc
index f0cbf3e5c58f16bbcf8e7f143ca6fc599c373525..7e62f6da0d72a06efe055f4bdf5d902bcecc9689 100644
--- a/webrtc/video/end_to_end_tests.cc
+++ b/webrtc/video/end_to_end_tests.cc
@@ -4278,13 +4278,9 @@ TEST_F(EndToEndTest, MAYBE_TestFlexfecRtpStatePreservation) {
rtc::CriticalSection crit_;
} observer;
- // These would have been declared as constexpr, but then some compilers
- // require them to be captured in the lambda, and other compilers complain
- // about no-ununused-lambda-capture. Keeping them as normal variables was
- // the easiest work-around.
- int kFrameMaxWidth = 320;
- int kFrameMaxHeight = 180;
- int kFrameRate = 15;
+ static constexpr int kFrameMaxWidth = 320;
+ static constexpr int kFrameMaxHeight = 180;
+ static constexpr int kFrameRate = 15;
Call::Config config(event_log_.get());
@@ -4371,8 +4367,7 @@ TEST_F(EndToEndTest, MAYBE_TestFlexfecRtpStatePreservation) {
EXPECT_TRUE(observer.Wait()) << "Timed out waiting for packets.";
- task_queue_.SendTask([this, &observer,
- kFrameRate, kFrameMaxWidth, kFrameMaxHeight]() {
+ task_queue_.SendTask([this, &observer]() {
// Ensure monotonicity when the VideoSendStream is recreated.
frame_generator_capturer_->Stop();
sender_call_->DestroyVideoSendStream(video_send_stream_);
« no previous file with comments | « webrtc/pc/channel_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698