summaryrefslogtreecommitdiff
path: root/src/mongo/db/db_raii.h
diff options
context:
space:
mode:
authorBilly Donahue <billy.donahue@mongodb.com>2019-03-27 12:21:37 -0400
committerBilly Donahue <billy.donahue@mongodb.com>2019-03-28 10:13:21 -0400
commitf922827d45ce752e148185dfa3a785f7c9cf29fd (patch)
treeb3ae7fdba18d9ef3384af6e0d009d091e5df14a3 /src/mongo/db/db_raii.h
parentf2f422d92b639edba0a10d40a43803723cb15baf (diff)
downloadmongo-f922827d45ce752e148185dfa3a785f7c9cf29fd.tar.gz
SERVER-40357 expand all calls to MONGO_DISALLOW_COPYING
produced by: hits="$(git grep -n MONGO_DISALLOW_COPYING | cut -d: -f1 )" for f in "$hits"; do sed -i.orig ' s/^\( *\)MONGO_DISALLOW_COPYING(\(.*\));/\1\2(const \2\&) = delete;\n\1\2\& operator=(const \2\&) = delete;/; ' $f done
Diffstat (limited to 'src/mongo/db/db_raii.h')
-rw-r--r--src/mongo/db/db_raii.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mongo/db/db_raii.h b/src/mongo/db/db_raii.h
index fbcb12f2bca..e6293022bf7 100644
--- a/src/mongo/db/db_raii.h
+++ b/src/mongo/db/db_raii.h
@@ -43,7 +43,8 @@ namespace mongo {
* desired.
*/
class AutoStatsTracker {
- MONGO_DISALLOW_COPYING(AutoStatsTracker);
+ AutoStatsTracker(const AutoStatsTracker&) = delete;
+ AutoStatsTracker& operator=(const AutoStatsTracker&) = delete;
public:
/**
@@ -94,7 +95,8 @@ private:
* snapshot to become available.
*/
class AutoGetCollectionForRead {
- MONGO_DISALLOW_COPYING(AutoGetCollectionForRead);
+ AutoGetCollectionForRead(const AutoGetCollectionForRead&) = delete;
+ AutoGetCollectionForRead& operator=(const AutoGetCollectionForRead&) = delete;
public:
AutoGetCollectionForRead(
@@ -149,7 +151,8 @@ private:
* ensure the CurrentOp object has the right namespace and has started its timer.
*/
class AutoGetCollectionForReadCommand {
- MONGO_DISALLOW_COPYING(AutoGetCollectionForReadCommand);
+ AutoGetCollectionForReadCommand(const AutoGetCollectionForReadCommand&) = delete;
+ AutoGetCollectionForReadCommand& operator=(const AutoGetCollectionForReadCommand&) = delete;
public:
AutoGetCollectionForReadCommand(
@@ -185,7 +188,8 @@ private:
* current operation.
*/
class OldClientContext {
- MONGO_DISALLOW_COPYING(OldClientContext);
+ OldClientContext(const OldClientContext&) = delete;
+ OldClientContext& operator=(const OldClientContext&) = delete;
public:
OldClientContext(OperationContext* opCtx, const std::string& ns, bool doVersion = true);