Skip to content

Commit 8a69457

Browse files
committed
CBD-6348: Replace deprecated implicit capture...
... by [=] with [this] Change-Id: Ic6c3ec03d01b7873987463c7af6fde4184ec11d0 Reviewed-on: https://review.couchbase.org/c/kv_engine/+/234581 Reviewed-by: Faizan Alam <[email protected]> Tested-by: Trond Norbye <[email protected]> Well-Formed: Restriction Checker
1 parent 6a387ef commit 8a69457

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

engines/ep/tests/module_tests/evp_store_single_threaded_test.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ void SingleThreadedKVBucketTest::shutdownAndPurgeTasks(
193193

194194
// Define a lambda to drive all tasks from the queue, if hpTaskQ
195195
// is implemented then trivial to add a second call to runTasks.
196-
auto runTasks = [=](TaskQueue& queue) {
196+
auto runTasks = [this](TaskQueue& queue) {
197197
while (queue.getFutureQueueSize() > 0 || queue.getReadyQueueSize() > 0) {
198198
runNextTask(queue);
199199
}
@@ -248,7 +248,7 @@ void SingleThreadedKVBucketTest::cancelAndPurgeTasks() {
248248

249249
// Define a lambda to drive all tasks from the queue, if hpTaskQ
250250
// is implemented then trivial to add a second call to runTasks.
251-
auto runTasks = [=](TaskQueue& queue) {
251+
auto runTasks = [this](TaskQueue& queue) {
252252
while (queue.getFutureQueueSize() > 0 || queue.getReadyQueueSize() > 0) {
253253
runNextTask(queue);
254254
}
@@ -5936,7 +5936,7 @@ void STParamPersistentBucketTest::testCancelCompaction(
59365936
}
59375937

59385938
// Drive all the tasks through the queue
5939-
auto runTasks = [=](TaskQueue& queue) {
5939+
auto runTasks = [this](TaskQueue& queue) {
59405940
while (queue.getFutureQueueSize() > 0 ||
59415941
queue.getReadyQueueSize() > 0) {
59425942
ObjectRegistry::onSwitchThread(engine.get());

engines/ep/tests/module_tests/evp_store_test.cc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2913,7 +2913,7 @@ TEST_P(EPBucketFullEvictionTest, CompactionBgFetchMustCleanUp) {
29132913
}
29142914

29152915
// Drive all the tasks through the queue
2916-
auto runTasks = [=](TaskQueue& queue) {
2916+
auto runTasks = [this](TaskQueue& queue) {
29172917
while (queue.getFutureQueueSize() > 0 ||
29182918
queue.getReadyQueueSize() > 0) {
29192919
ObjectRegistry::onSwitchThread(engine.get());
@@ -3372,4 +3372,4 @@ INSTANTIATE_TEST_SUITE_P(EPBucketCDCTest,
33723372
EPBucketCDCTest,
33733373
STParameterizedBucketTest::magmaConfigValues(),
33743374
STParameterizedBucketTest::PrintToStringParamName);
3375-
#endif // EP_USE_MAGMA
3375+
#endif // EP_USE_MAGMA

executor/fake_executorpool.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -153,26 +153,26 @@ class CheckedExecutor : public CB3ExecutorThread {
153153
if (getTaskName() == "Snapshotting vbucket states" ||
154154
getTaskName() == "Adjusting hash table sizes." ||
155155
getTaskName() == "Generating access log") {
156-
checker = [=](bool taskRescheduled) {
156+
checker = [this](bool taskRescheduled) {
157157
// These tasks all schedule one other task
158158
this->oneExecutes(taskRescheduled, 1);
159159
};
160160
} else if (getTaskName() == "CheckpointMemRecoveryTask:0") {
161-
checker = [=](bool taskRescheduled) {
161+
checker = [this](bool taskRescheduled) {
162162
// This task _may_ schedule or wake a CheckpointDestroyer, to
163163
// destroy checkpoints made unreferenced by cursor dropping
164164
this->oneExecutes(taskRescheduled, /*min*/ 0, /*max*/ 2);
165165
};
166166
} else if (getTaskName() == "Paging out items." ||
167167
getTaskName() == "Paging expired items.") {
168-
checker = [=](bool taskRescheduled) {
168+
checker = [this](bool taskRescheduled) {
169169
// This task _may_ schedule N subsequent tasks.
170170
// Bound it at 10 as a sanity check. If tests wish to configure
171171
// more than 10 concurrent visitors, this can be bumped.
172172
this->oneExecutes(taskRescheduled, /*min*/ 0, /*max*/ 10);
173173
};
174174
} else {
175-
checker = [=](bool taskRescheduled) {
175+
checker = [this](bool taskRescheduled) {
176176
this->oneExecutes(taskRescheduled, 0);
177177
};
178178
}

0 commit comments

Comments
 (0)