Index: webrtc/pc/channel_unittest.cc |
diff --git a/webrtc/pc/channel_unittest.cc b/webrtc/pc/channel_unittest.cc |
index fa9d3da52005d3f3dfc1448e2faf4681806e1ec6..0eaffc426dcfbe3b29afb1eae8dae8a9d7c35dc0 100644 |
--- a/webrtc/pc/channel_unittest.cc |
+++ b/webrtc/pc/channel_unittest.cc |
@@ -1205,9 +1205,13 @@ 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() { |
- constexpr uint16_t kLocalNetId = 1; |
- constexpr uint16_t kRemoteNetId = 2; |
- constexpr int kLastPacketId = 100; |
+ // 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; |
stefan-webrtc
2017/08/23 09:37:24
Can't we at least make them const?
eladalon
2017/08/23 10:26:26
No. The Mac compiler complains.
|
CreateChannels(0, 0); |
@@ -1227,7 +1231,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, media_channel1, |
+ network_thread_->Invoke<void>(RTC_FROM_HERE, [this, |
kLocalNetId, kRemoteNetId, |
kLastPacketId] { |
// The transport channel becomes connected. |