diff options
author | ADAM David Alan Martin <adam.martin@10gen.com> | 2017-03-10 18:34:08 -0500 |
---|---|---|
committer | ADAM David Alan Martin <adam.martin@10gen.com> | 2017-03-10 18:34:08 -0500 |
commit | 04b8ed12d08affcb06e88c8a2b4398628ae0aa62 (patch) | |
tree | 3e1a43aa762a2136422b4fa66f70ee89222d29a1 /src/mongo/s/ns_targeter.h | |
parent | 56810e6acb3a0425284189d852eaefb391e5f800 (diff) | |
download | mongo-04b8ed12d08affcb06e88c8a2b4398628ae0aa62.tar.gz |
SERVER-27975 Remove many uses of `OwnedPointerVector`
This removes many of the remaining uses of the deprecated
`OwnedPointerVector` type.
Diffstat (limited to 'src/mongo/s/ns_targeter.h')
-rw-r--r-- | src/mongo/s/ns_targeter.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/mongo/s/ns_targeter.h b/src/mongo/s/ns_targeter.h index 95e19a81a53..194514a44f3 100644 --- a/src/mongo/s/ns_targeter.h +++ b/src/mongo/s/ns_targeter.h @@ -28,7 +28,9 @@ #pragma once +#include <memory> #include <string> +#include <vector> #include "mongo/base/status.h" #include "mongo/bson/bsonobj.h" @@ -94,7 +96,7 @@ public: */ virtual Status targetUpdate(OperationContext* opCtx, const BatchedUpdateDocument& updateDoc, - std::vector<ShardEndpoint*>* endpoints) const = 0; + std::vector<std::unique_ptr<ShardEndpoint>>* endpoints) const = 0; /** * Returns a vector of ShardEndpoints for a potentially multi-shard delete. @@ -103,21 +105,23 @@ public: */ virtual Status targetDelete(OperationContext* opCtx, const BatchedDeleteDocument& deleteDoc, - std::vector<ShardEndpoint*>* endpoints) const = 0; + std::vector<std::unique_ptr<ShardEndpoint>>* endpoints) const = 0; /** * Returns a vector of ShardEndpoints for the entire collection. * * Returns !OK with message if the full collection could not be targeted. */ - virtual Status targetCollection(std::vector<ShardEndpoint*>* endpoints) const = 0; + virtual Status targetCollection( + std::vector<std::unique_ptr<ShardEndpoint>>* endpoints) const = 0; /** * Returns a vector of ShardEndpoints for all shards. * * Returns !OK with message if all shards could not be targeted. */ - virtual Status targetAllShards(std::vector<ShardEndpoint*>* endpoints) const = 0; + virtual Status targetAllShards( + std::vector<std::unique_ptr<ShardEndpoint>>* endpoints) const = 0; /** * Informs the targeter that a targeting failure occurred during one of the last targeting |