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/db/query | |
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/db/query')
-rw-r--r-- | src/mongo/db/query/collation/collation_index_key.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/query/collation/collator_factory_interface.h | 4 | ||||
-rw-r--r-- | src/mongo/db/query/collation/collator_interface.h | 4 | ||||
-rw-r--r-- | src/mongo/db/query/cursor_response.h | 7 | ||||
-rw-r--r-- | src/mongo/db/query/datetime/date_time_support.h | 4 | ||||
-rw-r--r-- | src/mongo/db/query/plan_cache.h | 9 | ||||
-rw-r--r-- | src/mongo/db/query/plan_cache_indexability.h | 4 | ||||
-rw-r--r-- | src/mongo/db/query/plan_enumerator.h | 4 | ||||
-rw-r--r-- | src/mongo/db/query/plan_executor_impl.h | 4 | ||||
-rw-r--r-- | src/mongo/db/query/query_settings.h | 7 | ||||
-rw-r--r-- | src/mongo/db/query/query_solution.h | 6 |
11 files changed, 32 insertions, 25 deletions
diff --git a/src/mongo/db/query/collation/collation_index_key.cpp b/src/mongo/db/query/collation/collation_index_key.cpp index b2407b58ead..3af408e8abd 100644 --- a/src/mongo/db/query/collation/collation_index_key.cpp +++ b/src/mongo/db/query/collation/collation_index_key.cpp @@ -33,7 +33,6 @@ #include <stack> -#include "mongo/base/disallow_copying.h" #include "mongo/bson/bsonobj.h" #include "mongo/bson/bsonobjbuilder.h" #include "mongo/bson/util/builder.h" @@ -49,7 +48,8 @@ namespace { // holds necessary information for in-progress translations. TranslateContexts are held by a // TranslateStack, which acts like a heap-allocated call stack. class TranslateContext { - MONGO_DISALLOW_COPYING(TranslateContext); + TranslateContext(const TranslateContext&) = delete; + TranslateContext& operator=(const TranslateContext&) = delete; public: TranslateContext(BSONObjIterator&& iter, BufBuilder* buf) diff --git a/src/mongo/db/query/collation/collator_factory_interface.h b/src/mongo/db/query/collation/collator_factory_interface.h index 8c3eef698f9..193e350ed0e 100644 --- a/src/mongo/db/query/collation/collator_factory_interface.h +++ b/src/mongo/db/query/collation/collator_factory_interface.h @@ -31,7 +31,6 @@ #include <memory> -#include "mongo/base/disallow_copying.h" #include "mongo/db/query/collation/collator_interface.h" namespace mongo { @@ -45,7 +44,8 @@ class StatusWith; * An interface which can be used to retrieve a collator. */ class CollatorFactoryInterface { - MONGO_DISALLOW_COPYING(CollatorFactoryInterface); + CollatorFactoryInterface(const CollatorFactoryInterface&) = delete; + CollatorFactoryInterface& operator=(const CollatorFactoryInterface&) = delete; public: CollatorFactoryInterface() = default; diff --git a/src/mongo/db/query/collation/collator_interface.h b/src/mongo/db/query/collation/collator_interface.h index 6b098340278..7cba6aa2bb1 100644 --- a/src/mongo/db/query/collation/collator_interface.h +++ b/src/mongo/db/query/collation/collator_interface.h @@ -32,7 +32,6 @@ #include <memory> #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/base/string_data.h" #include "mongo/base/string_data_comparator_interface.h" #include "mongo/bson/bsonobj_comparator_interface.h" @@ -49,7 +48,8 @@ namespace mongo { * Does not throw exceptions. */ class CollatorInterface : public StringData::ComparatorInterface { - MONGO_DISALLOW_COPYING(CollatorInterface); + CollatorInterface(const CollatorInterface&) = delete; + CollatorInterface& operator=(const CollatorInterface&) = delete; public: /** diff --git a/src/mongo/db/query/cursor_response.h b/src/mongo/db/query/cursor_response.h index 6412ab38e0b..b44ea0baba4 100644 --- a/src/mongo/db/query/cursor_response.h +++ b/src/mongo/db/query/cursor_response.h @@ -31,7 +31,6 @@ #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status_with.h" #include "mongo/bson/bsonobj.h" #include "mongo/db/clientcursor.h" @@ -46,7 +45,8 @@ namespace mongo { * command in place. */ class CursorResponseBuilder { - MONGO_DISALLOW_COPYING(CursorResponseBuilder); + CursorResponseBuilder(const CursorResponseBuilder&) = delete; + CursorResponseBuilder& operator=(const CursorResponseBuilder&) = delete; public: /** @@ -162,7 +162,8 @@ class CursorResponse { // TODO SERVER-32467 Remove this ifndef once the compiler has been fixed and the workaround has been // removed. #ifndef __s390x__ - MONGO_DISALLOW_COPYING(CursorResponse); + CursorResponse(const CursorResponse&) = delete; + CursorResponse& operator=(const CursorResponse&) = delete; #endif public: diff --git a/src/mongo/db/query/datetime/date_time_support.h b/src/mongo/db/query/datetime/date_time_support.h index 42697027cac..94ac4c4d08e 100644 --- a/src/mongo/db/query/datetime/date_time_support.h +++ b/src/mongo/db/query/datetime/date_time_support.h @@ -32,7 +32,6 @@ #include <memory> #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/db/service_context.h" #include "mongo/util/string_map.h" #include "mongo/util/time_support.h" @@ -332,7 +331,8 @@ private: * accessed via the global service context. */ class TimeZoneDatabase { - MONGO_DISALLOW_COPYING(TimeZoneDatabase); + TimeZoneDatabase(const TimeZoneDatabase&) = delete; + TimeZoneDatabase& operator=(const TimeZoneDatabase&) = delete; public: /** diff --git a/src/mongo/db/query/plan_cache.h b/src/mongo/db/query/plan_cache.h index 85199403d91..3c904ec3794 100644 --- a/src/mongo/db/query/plan_cache.h +++ b/src/mongo/db/query/plan_cache.h @@ -241,7 +241,8 @@ class PlanCacheEntry; */ class CachedSolution { private: - MONGO_DISALLOW_COPYING(CachedSolution); + CachedSolution(const CachedSolution&) = delete; + CachedSolution& operator=(const CachedSolution&) = delete; public: CachedSolution(const PlanCacheKey& key, const PlanCacheEntry& entry); @@ -275,7 +276,8 @@ public: */ class PlanCacheEntry { private: - MONGO_DISALLOW_COPYING(PlanCacheEntry); + PlanCacheEntry(const PlanCacheEntry&) = delete; + PlanCacheEntry& operator=(const PlanCacheEntry&) = delete; public: /** @@ -354,7 +356,8 @@ public: */ class PlanCache { private: - MONGO_DISALLOW_COPYING(PlanCache); + PlanCache(const PlanCache&) = delete; + PlanCache& operator=(const PlanCache&) = delete; public: // We have three states for a cache entry to be in. Rather than just 'present' or 'not diff --git a/src/mongo/db/query/plan_cache_indexability.h b/src/mongo/db/query/plan_cache_indexability.h index c38c3dd2d05..5c78dabd3d7 100644 --- a/src/mongo/db/query/plan_cache_indexability.h +++ b/src/mongo/db/query/plan_cache_indexability.h @@ -31,7 +31,6 @@ #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/db/exec/projection_exec_agg.h" #include "mongo/stdx/functional.h" #include "mongo/util/string_map.h" @@ -82,7 +81,8 @@ private: * expressions based on the data values in the expression. */ class PlanCacheIndexabilityState { - MONGO_DISALLOW_COPYING(PlanCacheIndexabilityState); + PlanCacheIndexabilityState(const PlanCacheIndexabilityState&) = delete; + PlanCacheIndexabilityState& operator=(const PlanCacheIndexabilityState&) = delete; public: PlanCacheIndexabilityState() = default; diff --git a/src/mongo/db/query/plan_enumerator.h b/src/mongo/db/query/plan_enumerator.h index d58b0206f41..0ae89741132 100644 --- a/src/mongo/db/query/plan_enumerator.h +++ b/src/mongo/db/query/plan_enumerator.h @@ -31,7 +31,6 @@ #include <vector> -#include "mongo/base/disallow_copying.h" #include "mongo/base/status.h" #include "mongo/db/query/canonical_query.h" #include "mongo/db/query/index_entry.h" @@ -73,7 +72,8 @@ struct PlanEnumeratorParams { * predicate information to make better decisions about what indices are best. */ class PlanEnumerator { - MONGO_DISALLOW_COPYING(PlanEnumerator); + PlanEnumerator(const PlanEnumerator&) = delete; + PlanEnumerator& operator=(const PlanEnumerator&) = delete; public: /** diff --git a/src/mongo/db/query/plan_executor_impl.h b/src/mongo/db/query/plan_executor_impl.h index 673abf6dc55..1b4dfda3dda 100644 --- a/src/mongo/db/query/plan_executor_impl.h +++ b/src/mongo/db/query/plan_executor_impl.h @@ -32,13 +32,13 @@ #include <boost/optional.hpp> #include <queue> -#include "mongo/base/disallow_copying.h" #include "mongo/db/query/plan_executor.h" namespace mongo { class PlanExecutorImpl : public PlanExecutor { - MONGO_DISALLOW_COPYING(PlanExecutorImpl); + PlanExecutorImpl(const PlanExecutorImpl&) = delete; + PlanExecutorImpl& operator=(const PlanExecutorImpl&) = delete; public: /** diff --git a/src/mongo/db/query/query_settings.h b/src/mongo/db/query/query_settings.h index 4c859b74791..4fac8e39161 100644 --- a/src/mongo/db/query/query_settings.h +++ b/src/mongo/db/query/query_settings.h @@ -32,7 +32,6 @@ #include <boost/optional.hpp> #include <string> -#include "mongo/base/disallow_copying.h" #include "mongo/bson/bsonobj.h" #include "mongo/bson/simple_bsonobj_comparator.h" #include "mongo/db/query/canonical_query.h" @@ -48,7 +47,8 @@ namespace mongo { */ class AllowedIndicesFilter { private: - MONGO_DISALLOW_COPYING(AllowedIndicesFilter); + AllowedIndicesFilter(const AllowedIndicesFilter&) = delete; + AllowedIndicesFilter& operator=(const AllowedIndicesFilter&) = delete; public: AllowedIndicesFilter(const BSONObjSet& indexKeyPatterns, @@ -107,7 +107,8 @@ public: */ class QuerySettings { private: - MONGO_DISALLOW_COPYING(QuerySettings); + QuerySettings(const QuerySettings&) = delete; + QuerySettings& operator=(const QuerySettings&) = delete; public: QuerySettings() = default; diff --git a/src/mongo/db/query/query_solution.h b/src/mongo/db/query/query_solution.h index 7bff63bf725..04e6cd6d997 100644 --- a/src/mongo/db/query/query_solution.h +++ b/src/mongo/db/query/query_solution.h @@ -188,7 +188,8 @@ protected: void addCommon(mongoutils::str::stream* ss, int indent) const; private: - MONGO_DISALLOW_COPYING(QuerySolutionNode); + QuerySolutionNode(const QuerySolutionNode&) = delete; + QuerySolutionNode& operator=(const QuerySolutionNode&) = delete; }; /** @@ -238,7 +239,8 @@ struct QuerySolution { } private: - MONGO_DISALLOW_COPYING(QuerySolution); + QuerySolution(const QuerySolution&) = delete; + QuerySolution& operator=(const QuerySolution&) = delete; }; struct TextNode : public QuerySolutionNode { |