Skip to content

Commit 95d64e9

Browse files
r-barnesfacebook-github-bot
authored andcommitted
Fix deprecated this capture in omnistore/snapshot/handlers/PeriodicSyncHandler.cpp +5
Summary: In the future LLVM will require that lambdas capture `this` explicitly. `-Wdeprecated-this-capture` checks for and enforces this now. This diff adds an explicit `this` capture to a lambda to fix an issue that presents similarly to this: ``` -> fbcode/path/to/my_file.cpp:66:47: error: implicit capture of 'this' with a capture default of '=' is deprecated [-Werror,- Wdeprecated-this-capture] -> detail::createIOWorkerProvider(evb, requestsRegistry_); -> ^ -> fbcode/path/to/my_file.cpp:61:30: note: add an explicit capture of 'this' to capture '*this' by reference -> evb->runInEventBaseThread([=, self_weak = std::move(self_weak)]() { -> ^ -> , this ``` Reviewed By: dtolnay Differential Revision: D81189814 fbshipit-source-id: 1c2ab90224683e129f4113a39e422f5259615482
1 parent 92e79db commit 95d64e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

proxygen/lib/http/session/test/HQDownstreamSessionTest.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ quic::StreamId HQDownstreamSessionTest::sendHeader() {
8484
folly::Promise<folly::Unit> HQDownstreamSessionTest::sendRequestLater(
8585
proxygen::HTTPMessage req, bool eof) {
8686
folly::Promise<folly::Unit> reqp;
87-
reqp.getSemiFuture().via(&eventBase_).thenValue([=](auto&&) {
87+
reqp.getSemiFuture().via(&eventBase_).thenValue([=, this](auto&&) {
8888
auto id = sendRequest(req, eof);
8989
socketDriver_->addReadEvent(
9090
id, getStream(id).buf.move(), std::chrono::milliseconds(0));

0 commit comments

Comments
 (0)