Skip to content

Commit f2eaf8e

Browse files
authored
Enable -Wdeprecated-this-capture in gloo/PACKAGE +1
Differential Revision: D87405440 Pull Request resolved: #473
1 parent a735743 commit f2eaf8e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

gloo/transport/uv/device.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,7 @@ void Device::connectAsListener(
304304
const Address& local,
305305
std::chrono::milliseconds timeout,
306306
ConnectCallback connectCallback) {
307-
defer([=] {
307+
defer([=, this] {
308308
decltype(pendingConnections_)::mapped_type pendingConnection;
309309

310310
// Find pending connection, or stash the connect callback.
@@ -360,7 +360,7 @@ void Device::connectAsInitiator(
360360
const Address& remote,
361361
std::chrono::milliseconds timeout,
362362
ConnectCallback fn) {
363-
defer([=] {
363+
defer([=, this] {
364364
auto tcp = loop_->resource<libuv::TCP>();
365365
auto timer = loop_->resource<libuv::Timer>();
366366

@@ -458,7 +458,7 @@ void Device::listenCallback() {
458458

459459
// Wait for remote side to write sequence number.
460460
handle->once<libuv::ReadEvent>(
461-
[=](const libuv::ReadEvent& event, libuv::TCP& handle) {
461+
[=, this](const libuv::ReadEvent& event, libuv::TCP& handle) {
462462
// Sequence number has been read. Either there is an existing
463463
// connection callback for this sequence number, or we'll hold
464464
// on to the handle while we wait for the pair to pass a

gloo/transport/uv/pair.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@ void Pair::closeWhileHoldingPairLock() {
554554
state_, CONNECTING, "Cannot close pair while waiting on connection");
555555
break;
556556
case CONNECTED:
557-
device_->defer([=] { this->handle_->close(); });
557+
device_->defer([=, this] { this->handle_->close(); });
558558
state_ = CLOSING;
559559
break;
560560
case CLOSING:

0 commit comments

Comments
 (0)