diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2019-11-07 15:22:08 +0000 |
---|---|---|
committer | evergreen <evergreen@mongodb.com> | 2019-11-07 15:22:08 +0000 |
commit | b2493375543cb89b020f224a1759c1f4d40aa638 (patch) | |
tree | 971629049003126366f31846208ce6bf65fdbd20 /src/mongo/tools | |
parent | a811bbe9d2489c428886288651c2dbddec0d123d (diff) | |
download | mongo-b2493375543cb89b020f224a1759c1f4d40aa638.tar.gz |
SERVER-44372 WeakFunction: a simplification of SHIM_ macros
Diffstat (limited to 'src/mongo/tools')
-rw-r--r-- | src/mongo/tools/mongoebench_main.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/tools/mongoebench_main.cpp b/src/mongo/tools/mongoebench_main.cpp index 89feb7cfb55..74f81264289 100644 --- a/src/mongo/tools/mongoebench_main.cpp +++ b/src/mongo/tools/mongoebench_main.cpp @@ -34,6 +34,7 @@ #include <boost/filesystem.hpp> #include "mongo/base/init.h" +#include "mongo/base/shim.h" #include "mongo/db/dbdirectclient.h" #include "mongo/db/service_context.h" #include "mongo/embedded/embedded.h" @@ -144,13 +145,14 @@ int mongoeBenchMain(int argc, char* argv[], char** envp) { shutdown(EXIT_CLEAN); } -} // namespace - -MONGO_REGISTER_SHIM(BenchRunConfig::createConnectionImpl) -(const BenchRunConfig& config)->std::unique_ptr<DBClientBase> { +std::unique_ptr<DBClientBase> benchRunConfigCreateConnectionImplProvider(const BenchRunConfig&) { return std::unique_ptr<DBClientBase>(new DBDirectClientWithOwnOpCtx()); } +auto benchRunConfigCreateConnectionImplRegistration = MONGO_WEAK_FUNCTION_REGISTRATION( + BenchRunConfig::createConnectionImpl, benchRunConfigCreateConnectionImplProvider); +} // namespace + } // namespace mongo #if defined(_WIN32) |