diff options
author | Arne H Juul <arnej@yahooinc.com> | 2022-03-29 12:53:37 +0000 |
---|---|---|
committer | Arne H Juul <arnej@yahooinc.com> | 2022-03-29 12:53:37 +0000 |
commit | c533430fd00b801968d58071d022de9f90a02515 (patch) | |
tree | a9e88e57475c30346f34a9aff0c91af12e3fba00 /searchcore | |
parent | 9bced6805fe2d89f9ba316399474a831c85985ff (diff) |
use std::function
* no need to implement our own (restricted) version of it
Diffstat (limited to 'searchcore')
-rw-r--r-- | searchcore/src/apps/tests/persistenceconformance_test.cpp | 4 | ||||
-rw-r--r-- | searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp | 8 |
2 files changed, 6 insertions, 6 deletions
diff --git a/searchcore/src/apps/tests/persistenceconformance_test.cpp b/searchcore/src/apps/tests/persistenceconformance_test.cpp index 7c0a9b29a7b..6b23f596835 100644 --- a/searchcore/src/apps/tests/persistenceconformance_test.cpp +++ b/searchcore/src/apps/tests/persistenceconformance_test.cpp @@ -113,9 +113,9 @@ public: DocumenttypesConfigSP getTypeCfg() const { return _typeCfg; } DocTypeVector getDocTypes() const { DocTypeVector types; - _repo->forEachDocumentType(*DocumentTypeRepo::makeLambda([&types](const DocumentType &type) { + _repo->forEachDocumentType([&types](const DocumentType &type) { types.push_back(DocTypeName(type.getName())); - })); + }); return types; } DocumentDBConfig::SP create(const DocTypeName &docTypeName) const { diff --git a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp index 2de24ee7803..8be44f0fd09 100644 --- a/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp +++ b/searchcore/src/tests/proton/documentdb/fileconfigmanager/fileconfigmanager_test.cpp @@ -95,12 +95,12 @@ assertEqualSnapshot(const DocumentDBConfig &exp, const DocumentDBConfig &act) int expTypeCount = 0; int actTypeCount = 0; - exp.getDocumentTypeRepoSP()->forEachDocumentType(*DocumentTypeRepo::makeLambda([&expTypeCount](const DocumentType &) { + exp.getDocumentTypeRepoSP()->forEachDocumentType([&expTypeCount](const DocumentType &) noexcept { expTypeCount++; - })); - act.getDocumentTypeRepoSP()->forEachDocumentType(*DocumentTypeRepo::makeLambda([&actTypeCount](const DocumentType &) { + }); + act.getDocumentTypeRepoSP()->forEachDocumentType([&actTypeCount](const DocumentType &) noexcept { actTypeCount++; - })); + }); EXPECT_EQUAL(expTypeCount, actTypeCount); EXPECT_TRUE(*exp.getSchemaSP() == *act.getSchemaSP()); EXPECT_EQUAL(expTypeCount, actTypeCount); |