diff options
author | Billy Donahue <billy.donahue@mongodb.com> | 2020-09-30 11:32:14 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-10-01 14:45:15 +0000 |
commit | 27d663f5e7b66a06e76fcef08f47121e19f3fbd6 (patch) | |
tree | 7a9ed3fca834e126bb1b99f57a142af5ec61f7cb /src/mongo | |
parent | c9bf1dbc9cc46e497b2f12b2d6685ef7348b0726 (diff) | |
download | mongo-27d663f5e7b66a06e76fcef08f47121e19f3fbd6.tar.gz |
SERVER-51084 easy XCode12 fixes (excludes the int to double fixes)
Diffstat (limited to 'src/mongo')
-rw-r--r-- | src/mongo/db/auth/authz_manager_external_state_s.h | 2 | ||||
-rw-r--r-- | src/mongo/db/auth/sasl_scram_server_conversation.h | 4 | ||||
-rw-r--r-- | src/mongo/db/free_mon/free_mon_controller_test.cpp | 3 | ||||
-rw-r--r-- | src/mongo/db/free_mon/free_mon_mongod.cpp | 3 | ||||
-rw-r--r-- | src/mongo/db/query/plan_explainer_impl.cpp | 4 | ||||
-rw-r--r-- | src/mongo/rpc/legacy_reply_builder.h | 2 | ||||
-rw-r--r-- | src/mongo/shell/kms_aws.cpp | 3 | ||||
-rw-r--r-- | src/mongo/shell/kms_local.cpp | 3 | ||||
-rw-r--r-- | src/mongo/util/net/http_client_curl.cpp | 4 |
9 files changed, 10 insertions, 18 deletions
diff --git a/src/mongo/db/auth/authz_manager_external_state_s.h b/src/mongo/db/auth/authz_manager_external_state_s.h index 4960d6bb255..2970f0b30e3 100644 --- a/src/mongo/db/auth/authz_manager_external_state_s.h +++ b/src/mongo/db/auth/authz_manager_external_state_s.h @@ -43,7 +43,7 @@ namespace mongo { /** * The implementation of AuthzManagerExternalState functionality for mongos. */ -class AuthzManagerExternalStateMongos : public AuthzManagerExternalState { +class AuthzManagerExternalStateMongos final : public AuthzManagerExternalState { AuthzManagerExternalStateMongos(const AuthzManagerExternalStateMongos&) = delete; AuthzManagerExternalStateMongos& operator=(const AuthzManagerExternalStateMongos&) = delete; diff --git a/src/mongo/db/auth/sasl_scram_server_conversation.h b/src/mongo/db/auth/sasl_scram_server_conversation.h index 4e596c0c8a4..c2e3952de67 100644 --- a/src/mongo/db/auth/sasl_scram_server_conversation.h +++ b/src/mongo/db/auth/sasl_scram_server_conversation.h @@ -40,15 +40,13 @@ namespace mongo { * Server side authentication session for SASL SCRAM-SHA-1/256. */ template <typename Policy> -class SaslSCRAMServerMechanism : public MakeServerMechanism<Policy> { +class SaslSCRAMServerMechanism final : public MakeServerMechanism<Policy> { public: using HashBlock = typename Policy::HashBlock; explicit SaslSCRAMServerMechanism(std::string authenticationDatabase) : MakeServerMechanism<Policy>(std::move(authenticationDatabase)) {} - ~SaslSCRAMServerMechanism() final = default; - /** * Take one step in a SCRAM-SHA-1 conversation. * diff --git a/src/mongo/db/free_mon/free_mon_controller_test.cpp b/src/mongo/db/free_mon/free_mon_controller_test.cpp index 908120f42f1..a0e9e492ce5 100644 --- a/src/mongo/db/free_mon/free_mon_controller_test.cpp +++ b/src/mongo/db/free_mon/free_mon_controller_test.cpp @@ -217,7 +217,7 @@ private: T _payload; }; -class FreeMonNetworkInterfaceMock : public FreeMonNetworkInterface { +class FreeMonNetworkInterfaceMock final : public FreeMonNetworkInterface { public: struct Options { // If sync = true, then execute the callback immediately and the subsequent future chain @@ -241,7 +241,6 @@ public: explicit FreeMonNetworkInterfaceMock(executor::ThreadPoolTaskExecutor* threadPool, Options options) : _threadPool(threadPool), _options(options), _countdownMetrics(0) {} - ~FreeMonNetworkInterfaceMock() final = default; Future<FreeMonRegistrationResponse> sendRegistrationAsync( const FreeMonRegistrationRequest& req) final { diff --git a/src/mongo/db/free_mon/free_mon_mongod.cpp b/src/mongo/db/free_mon/free_mon_mongod.cpp index bc33c921855..2a76481037d 100644 --- a/src/mongo/db/free_mon/free_mon_mongod.cpp +++ b/src/mongo/db/free_mon/free_mon_mongod.cpp @@ -84,7 +84,7 @@ auto makeTaskExecutor(ServiceContext* /*serviceContext*/) { std::make_unique<ThreadPool>(tpOptions), executor::makeNetworkInterface("FreeMonNet")); } -class FreeMonNetworkHttp : public FreeMonNetworkInterface { +class FreeMonNetworkHttp final : public FreeMonNetworkInterface { public: explicit FreeMonNetworkHttp(ServiceContext* serviceContext) { _executor = makeTaskExecutor(serviceContext); @@ -95,7 +95,6 @@ public: "Accept: application/octet-stream", "Expect:"}); } - ~FreeMonNetworkHttp() final = default; Future<FreeMonRegistrationResponse> sendRegistrationAsync( const FreeMonRegistrationRequest& req) override { diff --git a/src/mongo/db/query/plan_explainer_impl.cpp b/src/mongo/db/query/plan_explainer_impl.cpp index 637fd7f254a..757de6c0ab6 100644 --- a/src/mongo/db/query/plan_explainer_impl.cpp +++ b/src/mongo/db/query/plan_explainer_impl.cpp @@ -182,12 +182,12 @@ void appendMultikeyPaths(const BSONObj& keyPattern, BSONObjBuilder subMultikeyPaths(bob->subobjStart("multiKeyPaths")); size_t i = 0; - for (const auto keyElem : keyPattern) { + for (const auto& keyElem : keyPattern) { const FieldRef path{keyElem.fieldNameStringData()}; BSONArrayBuilder arrMultikeyComponents( subMultikeyPaths.subarrayStart(keyElem.fieldNameStringData())); - for (const auto multikeyComponent : multikeyPaths[i]) { + for (const auto& multikeyComponent : multikeyPaths[i]) { arrMultikeyComponents.append(path.dottedSubstring(0, multikeyComponent + 1)); } arrMultikeyComponents.doneFast(); diff --git a/src/mongo/rpc/legacy_reply_builder.h b/src/mongo/rpc/legacy_reply_builder.h index 40cf4a851a7..82e08f140e9 100644 --- a/src/mongo/rpc/legacy_reply_builder.h +++ b/src/mongo/rpc/legacy_reply_builder.h @@ -40,7 +40,7 @@ namespace mongo { namespace rpc { -class LegacyReplyBuilder : public ReplyBuilderInterface { +class LegacyReplyBuilder final : public ReplyBuilderInterface { public: static const char kCursorTag[]; static const char kFirstBatchTag[]; diff --git a/src/mongo/shell/kms_aws.cpp b/src/mongo/shell/kms_aws.cpp index 8cb1741a62c..9fb3ded3280 100644 --- a/src/mongo/shell/kms_aws.cpp +++ b/src/mongo/shell/kms_aws.cpp @@ -95,10 +95,9 @@ struct AWSConfig { /** * Manages SSL information and config for how to talk to AWS KMS. */ -class AWSKMSService : public KMSService { +class AWSKMSService final : public KMSService { public: AWSKMSService() = default; - ~AWSKMSService() final = default; static std::unique_ptr<KMSService> create(const AwsKMS& config); diff --git a/src/mongo/shell/kms_local.cpp b/src/mongo/shell/kms_local.cpp index 8e91326b706..3fbed4ce823 100644 --- a/src/mongo/shell/kms_local.cpp +++ b/src/mongo/shell/kms_local.cpp @@ -48,10 +48,9 @@ namespace { /** * Manages Local KMS Information */ -class LocalKMSService : public KMSService { +class LocalKMSService final : public KMSService { public: LocalKMSService(SymmetricKey key) : _key(std::move(key)) {} - ~LocalKMSService() final = default; static std::unique_ptr<KMSService> create(const LocalKMS& config); diff --git a/src/mongo/util/net/http_client_curl.cpp b/src/mongo/util/net/http_client_curl.cpp index ca8263595d9..08f1a8d96fe 100644 --- a/src/mongo/util/net/http_client_curl.cpp +++ b/src/mongo/util/net/http_client_curl.cpp @@ -200,7 +200,7 @@ struct CurlSlistFreeAll { }; using CurlSlist = std::unique_ptr<curl_slist, CurlSlistFreeAll>; -class CurlHttpClient : public HttpClient { +class CurlHttpClient final : public HttpClient { public: CurlHttpClient() { // Initialize a base handle with common settings. @@ -232,8 +232,6 @@ public: // curl_easy_setopt(_handle.get(), CURLOPT_DEBUGFUNCTION , ???); } - ~CurlHttpClient() final = default; - void allowInsecureHTTP(bool allow) final { if (allow) { curl_easy_setopt(_handle.get(), CURLOPT_PROTOCOLS, CURLPROTO_HTTPS | CURLPROTO_HTTP); |