diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2019-03-27 12:21:37 -0400 |
---|---|---|
committer | Billy Donahue <billy.donahue@mongodb.com> | 2019-03-28 10:13:21 -0400 |
commit | f922827d45ce752e148185dfa3a785f7c9cf29fd (patch) | |
tree | b3ae7fdba18d9ef3384af6e0d009d091e5df14a3 /src/mongo/bson | |
parent | f2f422d92b639edba0a10d40a43803723cb15baf (diff) | |
download | mongo-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/bson')
-rw-r--r-- | src/mongo/bson/bson_comparator_interface_base.h | 4 | ||||
-rw-r--r-- | src/mongo/bson/bsonmisc.h | 3 | ||||
-rw-r--r-- | src/mongo/bson/bsonobj.h | 4 | ||||
-rw-r--r-- | src/mongo/bson/bsonobjbuilder.h | 3 | ||||
-rw-r--r-- | src/mongo/bson/mutable/document.cpp | 3 | ||||
-rw-r--r-- | src/mongo/bson/mutable/document.h | 4 | ||||
-rw-r--r-- | src/mongo/bson/util/builder.h | 7 |
7 files changed, 16 insertions, 12 deletions
diff --git a/src/mongo/bson/bson_comparator_interface_base.h b/src/mongo/bson/bson_comparator_interface_base.h index f9f11e290e9..973c84ffb5c 100644 --- a/src/mongo/bson/bson_comparator_interface_base.h +++ b/src/mongo/bson/bson_comparator_interface_base.h @@ -35,7 +35,6 @@ #include <set> #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/string_data_comparator_interface.h" #include "mongo/stdx/unordered_map.h" #include "mongo/stdx/unordered_set.h" @@ -51,7 +50,8 @@ class BSONObj; */ template <typename T> class BSONComparatorInterfaceBase { - MONGO_DISALLOW_COPYING(BSONComparatorInterfaceBase); + BSONComparatorInterfaceBase(const BSONComparatorInterfaceBase&) = delete; + BSONComparatorInterfaceBase& operator=(const BSONComparatorInterfaceBase&) = delete; public: BSONComparatorInterfaceBase(BSONComparatorInterfaceBase&& other) = default; diff --git a/src/mongo/bson/bsonmisc.h b/src/mongo/bson/bsonmisc.h index db047dd8d2d..6baec67d7a6 100644 --- a/src/mongo/bson/bsonmisc.h +++ b/src/mongo/bson/bsonmisc.h @@ -188,7 +188,8 @@ extern Labeler::Label BSIZE; // Utility class to implement BSON( key << val ) as described above. class BSONObjBuilderValueStream { - MONGO_DISALLOW_COPYING(BSONObjBuilderValueStream); + BSONObjBuilderValueStream(const BSONObjBuilderValueStream&) = delete; + BSONObjBuilderValueStream& operator=(const BSONObjBuilderValueStream&) = delete; public: friend class Labeler; diff --git a/src/mongo/bson/bsonobj.h b/src/mongo/bson/bsonobj.h index 2bbe2e2d05b..336d84eb022 100644 --- a/src/mongo/bson/bsonobj.h +++ b/src/mongo/bson/bsonobj.h @@ -37,7 +37,6 @@ #include <vector> #include "mongo/base/data_type.h" -#include "mongo/base/disallow_copying.h" #include "mongo/base/string_data.h" #include "mongo/base/string_data_comparator_interface.h" #include "mongo/bson/bson_comparator_interface_base.h" @@ -754,7 +753,8 @@ private: /** Base class implementing ordered iteration through BSONElements. */ class BSONIteratorSorted { - MONGO_DISALLOW_COPYING(BSONIteratorSorted); + BSONIteratorSorted(const BSONIteratorSorted&) = delete; + BSONIteratorSorted& operator=(const BSONIteratorSorted&) = delete; public: ~BSONIteratorSorted() { diff --git a/src/mongo/bson/bsonobjbuilder.h b/src/mongo/bson/bsonobjbuilder.h index 9be6eab6987..c33021d6928 100644 --- a/src/mongo/bson/bsonobjbuilder.h +++ b/src/mongo/bson/bsonobjbuilder.h @@ -62,7 +62,8 @@ namespace mongo { See also the BSON() and BSON_ARRAY() macros. */ class BSONObjBuilder { - MONGO_DISALLOW_COPYING(BSONObjBuilder); + BSONObjBuilder(const BSONObjBuilder&) = delete; + BSONObjBuilder& operator=(const BSONObjBuilder&) = delete; public: /** @param initsize this is just a hint as to the final size of the object */ diff --git a/src/mongo/bson/mutable/document.cpp b/src/mongo/bson/mutable/document.cpp index aae9eddbe8b..1ef7ef07ecc 100644 --- a/src/mongo/bson/mutable/document.cpp +++ b/src/mongo/bson/mutable/document.cpp @@ -591,7 +591,8 @@ const bool paranoid = false; * Document. */ class Document::Impl { - MONGO_DISALLOW_COPYING(Impl); + Impl(const Impl&) = delete; + Impl& operator=(const Impl&) = delete; public: Impl(Document::InPlaceMode inPlaceMode) diff --git a/src/mongo/bson/mutable/document.h b/src/mongo/bson/mutable/document.h index 0828674b053..0098a6f06d9 100644 --- a/src/mongo/bson/mutable/document.h +++ b/src/mongo/bson/mutable/document.h @@ -31,7 +31,6 @@ #include <cstdint> -#include "mongo/base/disallow_copying.h" #include "mongo/base/string_data.h" #include "mongo/bson/mutable/const_element.h" #include "mongo/bson/mutable/damage_vector.h" @@ -234,7 +233,8 @@ namespace mutablebson { class Document { // TODO: In principle there is nothing that prevents implementing a deep copy for // Document, but for now it is not permitted. - MONGO_DISALLOW_COPYING(Document); + Document(const Document&) = delete; + Document& operator=(const Document&) = delete; public: // diff --git a/src/mongo/bson/util/builder.h b/src/mongo/bson/util/builder.h index b17b6d4752e..5a85a5fd219 100644 --- a/src/mongo/bson/util/builder.h +++ b/src/mongo/bson/util/builder.h @@ -41,7 +41,6 @@ #include "mongo/base/data_type_endian.h" #include "mongo/base/data_view.h" -#include "mongo/base/disallow_copying.h" #include "mongo/base/static_assert.h" #include "mongo/base/string_data.h" #include "mongo/bson/bsontypes.h" @@ -76,7 +75,8 @@ template <typename Allocator> class StringBuilderImpl; class SharedBufferAllocator { - MONGO_DISALLOW_COPYING(SharedBufferAllocator); + SharedBufferAllocator(const SharedBufferAllocator&) = delete; + SharedBufferAllocator& operator=(const SharedBufferAllocator&) = delete; public: SharedBufferAllocator() = default; @@ -111,7 +111,8 @@ private: }; class StackAllocator { - MONGO_DISALLOW_COPYING(StackAllocator); + StackAllocator(const StackAllocator&) = delete; + StackAllocator& operator=(const StackAllocator&) = delete; public: StackAllocator() = default; |