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

Unified Diff: webrtc/pc/channel_unittest.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/modules/audio_processing/aec3/residual_echo_estimator.cc ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/pc/channel_unittest.cc
diff --git a/webrtc/pc/channel_unittest.cc b/webrtc/pc/channel_unittest.cc
index 0eaffc426dcfbe3b29afb1eae8dae8a9d7c35dc0..3f30201874ec976f70208a299d977af5ff34d01e 100644
--- a/webrtc/pc/channel_unittest.cc
+++ b/webrtc/pc/channel_unittest.cc
@@ -1205,13 +1205,9 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
// Tests that when the transport channel signals a candidate pair change
// event, the media channel will receive a call on the network route change.
void TestNetworkRouteChanges() {
- // 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.
- uint16_t kLocalNetId = 1;
- uint16_t kRemoteNetId = 2;
- int kLastPacketId = 100;
+ static constexpr uint16_t kLocalNetId = 1;
+ static constexpr uint16_t kRemoteNetId = 2;
+ static constexpr int kLastPacketId = 100;
CreateChannels(0, 0);
@@ -1231,9 +1227,7 @@ class ChannelTest : public testing::Test, public sigslot::has_slots<> {
EXPECT_FALSE(media_channel1->last_network_route().connected);
media_channel1->set_num_network_route_changes(0);
- network_thread_->Invoke<void>(RTC_FROM_HERE, [this,
- kLocalNetId, kRemoteNetId,
- kLastPacketId] {
+ network_thread_->Invoke<void>(RTC_FROM_HERE, [this] {
// The transport channel becomes connected.
rtc::SocketAddress local_address("192.168.1.1", 1000 /* port number */);
rtc::SocketAddress remote_address("192.168.1.2", 2000 /* port number */);
« no previous file with comments | « webrtc/modules/audio_processing/aec3/residual_echo_estimator.cc ('k') | webrtc/video/end_to_end_tests.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698