Skip to content

Commit e344497

Browse files
r-barnesfacebook-github-bot
authored andcommitted
Fix deprecated this capture in arvr/projects/ariane/aria_research_kit/projectaria_tools_gen1_legacy/core/data_provider/VrsDataProviderFactory.cpp +1 (#271)
Summary: Pull Request resolved: #271 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 fbshipit-source-id: fabd5ef094655ac2ca23a173f926dbdb18c5403d
1 parent 6a27a1a commit e344497

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/data_provider/VrsDataProviderFactory.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ void VrsDataProviderFactory::addPlayers() {
119119
const SensorDataType sensorDataType = getSensorDataType(streamId.getTypeId());
120120

121121
// Define a lambda that sets the StreamPlayer to the reader and log its streamId
122-
auto setStreamAndLog = [=](const vrs::StreamId, vrs::RecordFormatStreamPlayer* player) -> void {
122+
auto setStreamAndLog = [=, this](
123+
const vrs::StreamId, vrs::RecordFormatStreamPlayer* player) -> void {
123124
reader_->setStreamPlayer(streamId, player);
124125
XR_LOGI(
125126
"streamId {}/{} activated",

0 commit comments

Comments
 (0)