From 2b2010a5085040e76b9c323e9e5d3b147263f166 Mon Sep 17 00:00:00 2001 From: Richard Barnes Date: Fri, 26 Sep 2025 13:15:40 -0700 Subject: [PATCH] Fix deprecated this capture in arvr/projects/ariane/aria_research_kit/projectaria_tools_gen1_legacy/core/data_provider/VrsDataProviderFactory.cpp +1 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: D82976785 --- core/data_provider/VrsDataProviderFactory.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/data_provider/VrsDataProviderFactory.cpp b/core/data_provider/VrsDataProviderFactory.cpp index 12d261797..b475cc3df 100644 --- a/core/data_provider/VrsDataProviderFactory.cpp +++ b/core/data_provider/VrsDataProviderFactory.cpp @@ -119,7 +119,8 @@ void VrsDataProviderFactory::addPlayers() { const SensorDataType sensorDataType = getSensorDataType(streamId.getTypeId()); // Define a lambda that sets the StreamPlayer to the reader and log its streamId - auto setStreamAndLog = [=](const vrs::StreamId, vrs::RecordFormatStreamPlayer* player) -> void { + auto setStreamAndLog = [=, this]( + const vrs::StreamId, vrs::RecordFormatStreamPlayer* player) -> void { reader_->setStreamPlayer(streamId, player); XR_LOGI( "streamId {}/{} activated",