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
main
sdong 9 years ago
parent 2073cf3775
commit 0e77246ba9
  1. 2
      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 // set up threads perform copies from files_to_copy_or_create_ in the
// background // background
for (int t = 0; t < options_.max_background_operations; t++) { for (int t = 0; t < options_.max_background_operations; t++) {
threads_.emplace_back([&]() { threads_.emplace_back([this]() {
CopyOrCreateWorkItem work_item; CopyOrCreateWorkItem work_item;
while (files_to_copy_or_create_.read(work_item)) { while (files_to_copy_or_create_.read(work_item)) {
CopyOrCreateResult result; CopyOrCreateResult result;

Loading…
Cancel
Save