summaryrefslogtreecommitdiffstats
path: root/searchlib/src/apps
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-12-02 17:35:00 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-12-02 17:35:00 +0000
commit4a7fe355da8efddec055943d7770619efe80cb03 (patch)
treed9b331d0d02feffe7c8e1adb30ea97247a159de2 /searchlib/src/apps
parent3eae4340b40e7551db5e55ca3ef4113bed59f4d4 (diff)
Make it compatible with c++2a
Diffstat (limited to 'searchlib/src/apps')
-rw-r--r--searchlib/src/apps/tests/btreestress_test.cpp14
-rw-r--r--searchlib/src/apps/tests/memoryindexstress_test.cpp4
2 files changed, 9 insertions, 9 deletions
diff --git a/searchlib/src/apps/tests/btreestress_test.cpp b/searchlib/src/apps/tests/btreestress_test.cpp
index 0fb356001f2..37fc6b26cc3 100644
--- a/searchlib/src/apps/tests/btreestress_test.cpp
+++ b/searchlib/src/apps/tests/btreestress_test.cpp
@@ -202,19 +202,19 @@ TEST_F("Test single threaded lower_bound reader during updates", Fixture)
{
uint32_t cnt = 1000000;
f._reportWork = true;
- f._writer.execute(makeLambdaTask([=]() { f.writeWork(cnt); }));
- f._readers.execute(makeLambdaTask([=]() { f.readWork(); }));
+ f._writer.execute(makeLambdaTask([this, cnt]() { f.writeWork(cnt); }));
+ f._readers.execute(makeLambdaTask([this]() { f.readWork(); }));
}
TEST_F("Test multithreaded lower_bound reader during updates", Fixture)
{
uint32_t cnt = 1000000;
f._reportWork = true;
- f._writer.execute(makeLambdaTask([=]() { f.writeWork(cnt); }));
- f._readers.execute(makeLambdaTask([=]() { f.readWork(); }));
- f._readers.execute(makeLambdaTask([=]() { f.readWork(); }));
- f._readers.execute(makeLambdaTask([=]() { f.readWork(); }));
- f._readers.execute(makeLambdaTask([=]() { f.readWork(); }));
+ f._writer.execute(makeLambdaTask([this, cnt]() { f.writeWork(cnt); }));
+ f._readers.execute(makeLambdaTask([this]() { f.readWork(); }));
+ f._readers.execute(makeLambdaTask([this]() { f.readWork(); }));
+ f._readers.execute(makeLambdaTask([this]() { f.readWork(); }));
+ f._readers.execute(makeLambdaTask([this]() { f.readWork(); }));
}
TEST_MAIN() { TEST_RUN_ALL(); }
diff --git a/searchlib/src/apps/tests/memoryindexstress_test.cpp b/searchlib/src/apps/tests/memoryindexstress_test.cpp
index 3f848b45cc3..e8590999bc1 100644
--- a/searchlib/src/apps/tests/memoryindexstress_test.cpp
+++ b/searchlib/src/apps/tests/memoryindexstress_test.cpp
@@ -371,9 +371,9 @@ Fixture::stressTest(uint32_t writeCnt)
LOG(info,
"starting stress test, 1 write thread, %u read threads, %u writes",
readThreads, writeCnt);
- _writer.execute(makeLambdaTask([=]() { writeWork(writeCnt); }));
+ _writer.execute(makeLambdaTask([this, writeCnt]() { writeWork(writeCnt); }));
for (uint32_t i = 0; i < readThreads; ++i) {
- _readers.execute(makeLambdaTask([=]() { readWork(); }));
+ _readers.execute(makeLambdaTask([this]() { readWork(); }));
}
}