diff --git a/db/db_test.cc b/db/db_test.cc index 0e7dcd03f..538f42f9a 100644 --- a/db/db_test.cc +++ b/db/db_test.cc @@ -2980,7 +2980,7 @@ TEST_F(DBTest, DynamicMemtableOptions) { options.level0_stop_writes_trigger = 1024; DestroyAndReopen(options); - auto gen_l0_kb = [this, kNumPutsBeforeWaitForFlush](int size) { + auto gen_l0_kb = [this](int size) { Random rnd(301); for (int i = 0; i < size; i++) { ASSERT_OK(Put(Key(i), RandomString(&rnd, 1024))); diff --git a/db/version_set.cc b/db/version_set.cc index bce380123..546fce8ad 100644 --- a/db/version_set.cc +++ b/db/version_set.cc @@ -1537,13 +1537,13 @@ void VersionStorageInfo::UpdateFilesByCompactionPri( break; case kOldestLargestSeqFirst: std::sort(temp.begin(), temp.end(), - [this](const Fsize& f1, const Fsize& f2) -> bool { + [](const Fsize& f1, const Fsize& f2) -> bool { return f1.file->largest_seqno < f2.file->largest_seqno; }); break; case kOldestSmallestSeqFirst: std::sort(temp.begin(), temp.end(), - [this](const Fsize& f1, const Fsize& f2) -> bool { + [](const Fsize& f1, const Fsize& f2) -> bool { return f1.file->smallest_seqno < f2.file->smallest_seqno; }); break;