From 0e77246ba90836bf5c2aa6d4e9cbed2537dc49c5 Mon Sep 17 00:00:00 2001 From: sdong Date: Thu, 19 May 2016 18:57:47 -0700 Subject: [PATCH] backupable_db.cc: lambada to explictly caputre "this" when escaping scope Summary: Google C++ Style writes: In particular, prefer to write lambda captures explicitly when capturing this or if the lambda will escape the current scope. Here it is the case for both. Test Plan: Run all test suites. Reviewers: andrewkr, dhruba Reviewed By: andrewkr, dhruba Subscribers: yhchiang, IslamAbdelRahman, leveldb, andrewkr, dhruba Differential Revision: https://reviews.facebook.net/D58515 --- utilities/backupable/backupable_db.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/utilities/backupable/backupable_db.cc b/utilities/backupable/backupable_db.cc index 37d9cb907..5c2c856da 100644 --- a/utilities/backupable/backupable_db.cc +++ b/utilities/backupable/backupable_db.cc @@ -632,7 +632,7 @@ Status BackupEngineImpl::Initialize() { // set up threads perform copies from files_to_copy_or_create_ in the // background for (int t = 0; t < options_.max_background_operations; t++) { - threads_.emplace_back([&]() { + threads_.emplace_back([this]() { CopyOrCreateWorkItem work_item; while (files_to_copy_or_create_.read(work_item)) { CopyOrCreateResult result; -- GitLab