summaryrefslogtreecommitdiff
path: root/src/mongo/db/sessions_collection_mock.cpp
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2017-12-06 14:40:59 -0500
committerBilly Donahue <billy.donahue@mongodb.com>2017-12-14 17:50:41 -0500
commit950fa6e6fd8f46248796dea3bc6c2392757b163d (patch)
tree2556f9322ee634477fc54b6876653b8ea702b8fa /src/mongo/db/sessions_collection_mock.cpp
parentd2eedbeeedb61753c17b6a87912e4b14e7611b95 (diff)
downloadmongo-950fa6e6fd8f46248796dea3bc6c2392757b163d.tar.gz
SERVER-32070 migrate some easy stdx::bind to lambdas (pt3)
Diffstat (limited to 'src/mongo/db/sessions_collection_mock.cpp')
-rw-r--r--src/mongo/db/sessions_collection_mock.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/src/mongo/db/sessions_collection_mock.cpp b/src/mongo/db/sessions_collection_mock.cpp
index 7f2cff63e70..1319fd891df 100644
--- a/src/mongo/db/sessions_collection_mock.cpp
+++ b/src/mongo/db/sessions_collection_mock.cpp
@@ -33,11 +33,8 @@
namespace mongo {
MockSessionsCollectionImpl::MockSessionsCollectionImpl()
- : _sessions(),
- _refresh(
- stdx::bind(&MockSessionsCollectionImpl::_refreshSessions, this, stdx::placeholders::_1)),
- _remove(
- stdx::bind(&MockSessionsCollectionImpl::_removeRecords, this, stdx::placeholders::_1)) {}
+ : _refresh([=](const LogicalSessionRecordSet& sessions) { return _refreshSessions(sessions); }),
+ _remove([=](const LogicalSessionIdSet& sessions) { return _removeRecords(sessions); }) {}
void MockSessionsCollectionImpl::setRefreshHook(RefreshHook hook) {
_refresh = std::move(hook);
@@ -48,9 +45,8 @@ void MockSessionsCollectionImpl::setRemoveHook(RemoveHook hook) {
}
void MockSessionsCollectionImpl::clearHooks() {
- _refresh =
- stdx::bind(&MockSessionsCollectionImpl::_refreshSessions, this, stdx::placeholders::_1);
- _remove = stdx::bind(&MockSessionsCollectionImpl::_removeRecords, this, stdx::placeholders::_1);
+ _refresh = [=](const LogicalSessionRecordSet& sessions) { return _refreshSessions(sessions); };
+ _remove = [=](const LogicalSessionIdSet& sessions) { return _removeRecords(sessions); };
}
Status MockSessionsCollectionImpl::refreshSessions(const LogicalSessionRecordSet& sessions) {