summaryrefslogtreecommitdiff
path: root/src/mongo/shell/bench.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/shell/bench.cpp
parenta811bbe9d2489c428886288651c2dbddec0d123d (diff)
downloadmongo-b2493375543cb89b020f224a1759c1f4d40aa638.tar.gz
SERVER-44372 WeakFunction: a simplification of SHIM_ macros
Diffstat (limited to 'src/mongo/shell/bench.cpp')
-rw-r--r--src/mongo/shell/bench.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mongo/shell/bench.cpp b/src/mongo/shell/bench.cpp
index 1f318f938dd..9e7dfe3d3a7 100644
--- a/src/mongo/shell/bench.cpp
+++ b/src/mongo/shell/bench.cpp
@@ -35,6 +35,7 @@
#include <pcrecpp.h>
+#include "mongo/base/shim.h"
#include "mongo/client/dbclient_cursor.h"
#include "mongo/db/namespace_string.h"
#include "mongo/db/query/cursor_response.h"
@@ -743,7 +744,11 @@ void BenchRunConfig::initializeFromBson(const BSONObj& args) {
}
}
-MONGO_DEFINE_SHIM(BenchRunConfig::createConnectionImpl);
+std::unique_ptr<DBClientBase> BenchRunConfig::createConnectionImpl(
+ const BenchRunConfig& benchRunConfig) {
+ static auto w = MONGO_WEAK_FUNCTION_DEFINITION(BenchRunConfig::createConnectionImpl);
+ return w(benchRunConfig);
+}
std::unique_ptr<DBClientBase> BenchRunConfig::createConnection() const {
return BenchRunConfig::createConnectionImpl(*this);