Skip to content

Commit 8d2a3ab

Browse files
r-barnesfacebook-github-bot
authored andcommitted
Fix deprecated this capture in c2p/secure_thrift/cpp/proxy/http/tests/WebSocketProxyServerTest.cpp
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 ``` Differential Revision: D80966357 fbshipit-source-id: f4dcd26da4d53094a315e3506d799191d1d3c04c
1 parent c81f437 commit 8d2a3ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cachelib/navy/serialization/RecordIO.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ class DeviceMetaDataWriter final : public RecordWriter {
110110
auto dataOffset = 0;
111111
uint8_t* bufferData = buffer_.data();
112112

113-
auto flushBuffer = [=]() mutable {
113+
auto flushBuffer = [=, this]() mutable {
114114
auto extraBytes = blockSize_ - bufIndex_;
115115
// zero the unused bytes in the buffer
116116
memset(&bufferData[bufIndex_], 0, extraBytes);

0 commit comments

Comments
 (0)