summaryrefslogtreecommitdiff
path: root/src/mongo/embedded/embedded_auth_session.cpp
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2019-11-07 15:22:08 +0000
committerevergreen <evergreen@mongodb.com>2019-11-07 15:22:08 +0000
commitb2493375543cb89b020f224a1759c1f4d40aa638 (patch)
tree971629049003126366f31846208ce6bf65fdbd20 /src/mongo/embedded/embedded_auth_session.cpp
parenta811bbe9d2489c428886288651c2dbddec0d123d (diff)
downloadmongo-b2493375543cb89b020f224a1759c1f4d40aa638.tar.gz
SERVER-44372 WeakFunction: a simplification of SHIM_ macros
Diffstat (limited to 'src/mongo/embedded/embedded_auth_session.cpp')
-rw-r--r--src/mongo/embedded/embedded_auth_session.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/mongo/embedded/embedded_auth_session.cpp b/src/mongo/embedded/embedded_auth_session.cpp
index d012f913463..9f4fcfdbd58 100644
--- a/src/mongo/embedded/embedded_auth_session.cpp
+++ b/src/mongo/embedded/embedded_auth_session.cpp
@@ -29,6 +29,7 @@
#include "mongo/platform/basic.h"
+#include "mongo/base/shim.h"
#include "mongo/db/auth/authorization_session.h"
#include "mongo/embedded/not_implemented.h"
#include "mongo/util/assert_util.h"
@@ -277,9 +278,16 @@ private:
} // namespace
} // namespace embedded
-MONGO_REGISTER_SHIM(AuthorizationSession::create)
-(AuthorizationManager* const authzManager)->std::unique_ptr<AuthorizationSession> {
+namespace {
+
+std::unique_ptr<AuthorizationSession> authorizationSessionCreateImpl(
+ AuthorizationManager* authzManager) {
return std::make_unique<embedded::AuthorizationSession>(authzManager);
}
+auto authorizationSessionCreateRegistration =
+ MONGO_WEAK_FUNCTION_REGISTRATION(AuthorizationSession::create, authorizationSessionCreateImpl);
+
+} // namespace
+
} // namespace mongo