From 589a5c169ced8f6e9ddcd3d182ae1b75db6b7d79 Mon Sep 17 00:00:00 2001 From: Maria van Keulen Date: Tue, 7 Mar 2017 12:00:08 -0500 Subject: SERVER-27938 Rename all OperationContext variables to opCtx This commit is an automated rename of all whole word instances of txn, _txn, and txnPtr to opCtx, _opCtx, and opCtxPtr, respectively in all .cpp and .h files in src/mongo. --- src/mongo/dbtests/perftests.cpp | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'src/mongo/dbtests/perftests.cpp') diff --git a/src/mongo/dbtests/perftests.cpp b/src/mongo/dbtests/perftests.cpp index 8c761037950..042b3629b5d 100644 --- a/src/mongo/dbtests/perftests.cpp +++ b/src/mongo/dbtests/perftests.cpp @@ -82,11 +82,11 @@ const bool profiling = false; class ClientBase { public: - ClientBase() : _client(&_txn) { - mongo::LastError::get(_txn.getClient()).reset(); + ClientBase() : _client(&_opCtx) { + mongo::LastError::get(_opCtx.getClient()).reset(); } virtual ~ClientBase() { - mongo::LastError::get(_txn.getClient()).reset(); + mongo::LastError::get(_opCtx.getClient()).reset(); } protected: @@ -103,13 +103,13 @@ protected: DBClientBase* client() { return &_client; } - OperationContext* txn() { - return &_txn; + OperationContext* opCtx() { + return &_opCtx; } private: const ServiceContext::UniqueOperationContext _txnPtr = cc().makeOperationContext(); - OperationContext& _txn = *_txnPtr; + OperationContext& _opCtx = *_txnPtr; DBDirectClient _client; }; @@ -332,9 +332,9 @@ public: srand(++z ^ (unsigned)time(0)); #endif Client::initThreadIfNotAlready("perftestthr"); - const ServiceContext::UniqueOperationContext txnPtr = cc().makeOperationContext(); - OperationContext& txn = *txnPtr; - DBDirectClient c(&txn); + const ServiceContext::UniqueOperationContext opCtxPtr = cc().makeOperationContext(); + OperationContext& opCtx = *opCtxPtr; + DBDirectClient c(&opCtx); const unsigned int Batch = batchSize(); prepThreaded(); -- cgit v1.2.1