diff options
author | Jason Rassi <rassi@10gen.com> | 2015-06-18 20:33:11 -0400 |
---|---|---|
committer | Jason Rassi <rassi@10gen.com> | 2015-06-19 14:32:31 -0400 |
commit | b5e9986cfa60eddb995acdd926bdefc513fe2735 (patch) | |
tree | 720f54a4abc00ec40c19b7ab31c8ba25eea8c938 | |
parent | 54e8c6b505d8a53014677ae0a1579695229022aa (diff) | |
download | mongo-b5e9986cfa60eddb995acdd926bdefc513fe2735.tar.gz |
SERVER-17308 Remove duplicate std::unique_ptr using-declarations
39 files changed, 36 insertions, 75 deletions
diff --git a/src/mongo/client/dbclient_rs_test.cpp b/src/mongo/client/dbclient_rs_test.cpp index a4496b267ef..7f0e1d703e1 100644 --- a/src/mongo/client/dbclient_rs_test.cpp +++ b/src/mongo/client/dbclient_rs_test.cpp @@ -50,12 +50,11 @@ #include "mongo/util/assert_util.h" namespace { - using std::unique_ptr; - using std::unique_ptr; - using std::map; using std::make_pair; + using std::map; using std::pair; using std::string; + using std::unique_ptr; using std::vector; using mongo::AssertionException; diff --git a/src/mongo/db/cloner.cpp b/src/mongo/db/cloner.cpp index 578da9b76c8..0837db844c0 100644 --- a/src/mongo/db/cloner.cpp +++ b/src/mongo/db/cloner.cpp @@ -66,12 +66,11 @@ namespace mongo { - using std::unique_ptr; - using std::unique_ptr; + using std::endl; using std::list; using std::set; - using std::endl; using std::string; + using std::unique_ptr; using std::vector; MONGO_EXPORT_SERVER_PARAMETER(skipCorruptDocumentsWhenCloning, bool, false); diff --git a/src/mongo/db/commands/dbhash.cpp b/src/mongo/db/commands/dbhash.cpp index 4dc2d8527f6..14a4ab955d5 100644 --- a/src/mongo/db/commands/dbhash.cpp +++ b/src/mongo/db/commands/dbhash.cpp @@ -46,12 +46,11 @@ namespace mongo { - using std::unique_ptr; - using std::unique_ptr; - using std::list; using std::endl; + using std::list; using std::set; using std::string; + using std::unique_ptr; using std::vector; DBHashCmd dbhashCmd; diff --git a/src/mongo/db/commands/index_filter_commands_test.cpp b/src/mongo/db/commands/index_filter_commands_test.cpp index 0994e4c89cf..108c7d85bbb 100644 --- a/src/mongo/db/commands/index_filter_commands_test.cpp +++ b/src/mongo/db/commands/index_filter_commands_test.cpp @@ -43,9 +43,8 @@ using namespace mongo; namespace { - using std::unique_ptr; - using std::unique_ptr; using std::string; + using std::unique_ptr; using std::vector; static const char* ns = "test.t"; diff --git a/src/mongo/db/commands/mr.cpp b/src/mongo/db/commands/mr.cpp index fa9d590b2e8..d88f05f733f 100644 --- a/src/mongo/db/commands/mr.cpp +++ b/src/mongo/db/commands/mr.cpp @@ -71,13 +71,12 @@ namespace mongo { - using std::unique_ptr; - using std::shared_ptr; - using std::unique_ptr; using std::endl; using std::set; + using std::shared_ptr; using std::string; using std::stringstream; + using std::unique_ptr; using std::vector; namespace mr { diff --git a/src/mongo/db/commands/pipeline_command.cpp b/src/mongo/db/commands/pipeline_command.cpp index 034738ac64a..4f9274dc6b7 100644 --- a/src/mongo/db/commands/pipeline_command.cpp +++ b/src/mongo/db/commands/pipeline_command.cpp @@ -55,12 +55,11 @@ namespace mongo { using boost::intrusive_ptr; - using std::unique_ptr; + using std::endl; using std::shared_ptr; - using std::unique_ptr; using std::string; using std::stringstream; - using std::endl; + using std::unique_ptr; /** * Returns true if we need to keep a ClientCursor saved for this pipeline (for future getMore diff --git a/src/mongo/db/commands/plan_cache_commands.cpp b/src/mongo/db/commands/plan_cache_commands.cpp index de19f1e10a5..3fc5d8f313e 100644 --- a/src/mongo/db/commands/plan_cache_commands.cpp +++ b/src/mongo/db/commands/plan_cache_commands.cpp @@ -48,8 +48,8 @@ namespace { - using std::unique_ptr; using std::string; + using std::unique_ptr; using namespace mongo; /** diff --git a/src/mongo/db/commands/plan_cache_commands_test.cpp b/src/mongo/db/commands/plan_cache_commands_test.cpp index ec6a5ea7967..86eecdbda7e 100644 --- a/src/mongo/db/commands/plan_cache_commands_test.cpp +++ b/src/mongo/db/commands/plan_cache_commands_test.cpp @@ -45,9 +45,8 @@ using namespace mongo; namespace { - using std::unique_ptr; - using std::unique_ptr; using std::string; + using std::unique_ptr; using std::vector; static const char* ns = "test.t"; diff --git a/src/mongo/db/commands/write_commands/batch_executor.cpp b/src/mongo/db/commands/write_commands/batch_executor.cpp index 8f2ead63f7c..0b277ddfa56 100644 --- a/src/mongo/db/commands/write_commands/batch_executor.cpp +++ b/src/mongo/db/commands/write_commands/batch_executor.cpp @@ -83,10 +83,9 @@ namespace mongo { - using std::unique_ptr; - using std::unique_ptr; using std::endl; using std::string; + using std::unique_ptr; using std::vector; namespace { diff --git a/src/mongo/db/dbcommands.cpp b/src/mongo/db/dbcommands.cpp index 4b6fb92b048..8369de72ec8 100644 --- a/src/mongo/db/dbcommands.cpp +++ b/src/mongo/db/dbcommands.cpp @@ -110,12 +110,11 @@ namespace mongo { - using std::unique_ptr; - using std::unique_ptr; using std::endl; using std::ostringstream; using std::string; using std::stringstream; + using std::unique_ptr; class CmdShutdownMongoD : public CmdShutdown { public: diff --git a/src/mongo/db/exec/geo_near.cpp b/src/mongo/db/exec/geo_near.cpp index 65d4428b3a8..1776fd95a26 100644 --- a/src/mongo/db/exec/geo_near.cpp +++ b/src/mongo/db/exec/geo_near.cpp @@ -51,7 +51,6 @@ namespace mongo { - using std::unique_ptr; using std::abs; using std::unique_ptr; diff --git a/src/mongo/db/geo/big_polygon.cpp b/src/mongo/db/geo/big_polygon.cpp index 94723eb4cae..fb496bfa96e 100644 --- a/src/mongo/db/geo/big_polygon.cpp +++ b/src/mongo/db/geo/big_polygon.cpp @@ -36,7 +36,6 @@ namespace mongo { using std::unique_ptr; - using std::unique_ptr; using std::vector; diff --git a/src/mongo/db/instance.cpp b/src/mongo/db/instance.cpp index e3f88f80b28..f207624c4a3 100644 --- a/src/mongo/db/instance.cpp +++ b/src/mongo/db/instance.cpp @@ -109,15 +109,14 @@ namespace mongo { - using std::unique_ptr; using logger::LogComponent; - using std::unique_ptr; using std::endl; using std::hex; using std::ios; using std::ofstream; using std::string; using std::stringstream; + using std::unique_ptr; using std::vector; // for diaglog diff --git a/src/mongo/db/ops/update_driver.cpp b/src/mongo/db/ops/update_driver.cpp index 0cb17de5de6..28ae06215ae 100644 --- a/src/mongo/db/ops/update_driver.cpp +++ b/src/mongo/db/ops/update_driver.cpp @@ -48,7 +48,6 @@ namespace mongo { namespace mb = mongo::mutablebson; using std::unique_ptr; - using std::unique_ptr; using std::vector; using pathsupport::EqualityMatches; diff --git a/src/mongo/db/query/canonical_query_test.cpp b/src/mongo/db/query/canonical_query_test.cpp index 14797c91ab3..d125cb692ab 100644 --- a/src/mongo/db/query/canonical_query_test.cpp +++ b/src/mongo/db/query/canonical_query_test.cpp @@ -34,7 +34,6 @@ namespace mongo { namespace { - using std::unique_ptr; using std::string; using std::unique_ptr; using unittest::assertGet; diff --git a/src/mongo/db/query/explain.cpp b/src/mongo/db/query/explain.cpp index 8eeb44d4088..709fd07b28b 100644 --- a/src/mongo/db/query/explain.cpp +++ b/src/mongo/db/query/explain.cpp @@ -47,9 +47,8 @@ namespace { using namespace mongo; - using std::unique_ptr; - using std::unique_ptr; using std::string; + using std::unique_ptr; using std::vector; /** diff --git a/src/mongo/db/query/find.cpp b/src/mongo/db/query/find.cpp index d266518a961..ffb57194ebf 100644 --- a/src/mongo/db/query/find.cpp +++ b/src/mongo/db/query/find.cpp @@ -61,9 +61,8 @@ #include "mongo/util/log.h" #include "mongo/util/mongoutils/str.h" -using std::unique_ptr; -using std::unique_ptr; using std::endl; +using std::unique_ptr; namespace mongo { diff --git a/src/mongo/db/query/plan_cache_test.cpp b/src/mongo/db/query/plan_cache_test.cpp index 5b286023eaa..78b9bdf959c 100644 --- a/src/mongo/db/query/plan_cache_test.cpp +++ b/src/mongo/db/query/plan_cache_test.cpp @@ -50,8 +50,6 @@ using namespace mongo; namespace { - using std::unique_ptr; - using std::unique_ptr; using std::string; using std::unique_ptr; using std::vector; diff --git a/src/mongo/db/repl/master_slave.cpp b/src/mongo/db/repl/master_slave.cpp index b01d74fefe7..a1a58527b62 100644 --- a/src/mongo/db/repl/master_slave.cpp +++ b/src/mongo/db/repl/master_slave.cpp @@ -70,14 +70,13 @@ #include "mongo/util/exit.h" #include "mongo/util/log.h" -using std::unique_ptr; -using std::unique_ptr; using std::cout; using std::endl; using std::max; using std::min; using std::set; using std::stringstream; +using std::unique_ptr; using std::vector; namespace mongo { diff --git a/src/mongo/db/repl/repl_set_heartbeat_response_test.cpp b/src/mongo/db/repl/repl_set_heartbeat_response_test.cpp index c416c3c3f3c..aed87536dcc 100644 --- a/src/mongo/db/repl/repl_set_heartbeat_response_test.cpp +++ b/src/mongo/db/repl/repl_set_heartbeat_response_test.cpp @@ -38,7 +38,6 @@ namespace repl { namespace { using std::unique_ptr; - using std::unique_ptr; bool stringContains(const std::string &haystack, const std::string& needle) { return haystack.find(needle) != std::string::npos; diff --git a/src/mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.cpp b/src/mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.cpp index 34dede1f702..6cc9d9cef73 100644 --- a/src/mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.cpp +++ b/src/mongo/db/storage/mmap_v1/mmap_v1_database_catalog_entry.cpp @@ -56,7 +56,6 @@ namespace mongo { using std::unique_ptr; - using std::unique_ptr; namespace { diff --git a/src/mongo/dbtests/jstests.cpp b/src/mongo/dbtests/jstests.cpp index c715db5e76d..59d4682407a 100644 --- a/src/mongo/dbtests/jstests.cpp +++ b/src/mongo/dbtests/jstests.cpp @@ -46,12 +46,11 @@ #include "mongo/util/log.h" #include "mongo/util/timer.h" -using std::unique_ptr; -using std::unique_ptr; using std::cout; using std::endl; using std::string; using std::stringstream; +using std::unique_ptr; using std::vector; namespace JSTests { diff --git a/src/mongo/dbtests/query_multi_plan_runner.cpp b/src/mongo/dbtests/query_multi_plan_runner.cpp index 6e033631f02..ec0154ef3dd 100644 --- a/src/mongo/dbtests/query_multi_plan_runner.cpp +++ b/src/mongo/dbtests/query_multi_plan_runner.cpp @@ -57,7 +57,6 @@ namespace mongo { namespace QueryMultiPlanRunner { using std::unique_ptr; - using std::unique_ptr; using std::vector; /** diff --git a/src/mongo/dbtests/query_plan_executor.cpp b/src/mongo/dbtests/query_plan_executor.cpp index e285e3919cb..58149558719 100644 --- a/src/mongo/dbtests/query_plan_executor.cpp +++ b/src/mongo/dbtests/query_plan_executor.cpp @@ -49,10 +49,9 @@ namespace QueryPlanExecutor { - using std::unique_ptr; using std::shared_ptr; - using std::unique_ptr; using std::string; + using std::unique_ptr; class PlanExecutorBase { public: diff --git a/src/mongo/dbtests/query_stage_and.cpp b/src/mongo/dbtests/query_stage_and.cpp index 58041069a57..0e7604c8163 100644 --- a/src/mongo/dbtests/query_stage_and.cpp +++ b/src/mongo/dbtests/query_stage_and.cpp @@ -52,10 +52,9 @@ namespace QueryStageAnd { - using std::unique_ptr; + using std::set; using std::shared_ptr; using std::unique_ptr; - using std::set; class QueryStageAndBase { public: diff --git a/src/mongo/dbtests/query_stage_collscan.cpp b/src/mongo/dbtests/query_stage_collscan.cpp index b190e852df8..b76f599db98 100644 --- a/src/mongo/dbtests/query_stage_collscan.cpp +++ b/src/mongo/dbtests/query_stage_collscan.cpp @@ -49,7 +49,6 @@ namespace QueryStageCollectionScan { using std::unique_ptr; - using std::unique_ptr; using std::vector; // diff --git a/src/mongo/dbtests/query_stage_count.cpp b/src/mongo/dbtests/query_stage_count.cpp index 3a8ea2dcb8b..7c326b15c11 100644 --- a/src/mongo/dbtests/query_stage_count.cpp +++ b/src/mongo/dbtests/query_stage_count.cpp @@ -43,7 +43,6 @@ namespace QueryStageCount { using std::unique_ptr; - using std::unique_ptr; using std::vector; const int kDocuments = 100; diff --git a/src/mongo/dbtests/query_stage_limit_skip.cpp b/src/mongo/dbtests/query_stage_limit_skip.cpp index b7561d12f8b..36e6dcc5756 100644 --- a/src/mongo/dbtests/query_stage_limit_skip.cpp +++ b/src/mongo/dbtests/query_stage_limit_skip.cpp @@ -44,10 +44,9 @@ using namespace mongo; namespace { - using std::unique_ptr; - using std::unique_ptr; using std::max; using std::min; + using std::unique_ptr; static const int N = 50; diff --git a/src/mongo/dbtests/query_stage_update.cpp b/src/mongo/dbtests/query_stage_update.cpp index edc3c952fca..b40bc84a918 100644 --- a/src/mongo/dbtests/query_stage_update.cpp +++ b/src/mongo/dbtests/query_stage_update.cpp @@ -54,7 +54,6 @@ namespace QueryStageUpdate { using std::unique_ptr; - using std::unique_ptr; using std::vector; class QueryStageUpdateBase { diff --git a/src/mongo/s/balance.cpp b/src/mongo/s/balance.cpp index 148707ffd66..0ef5d3c42ce 100644 --- a/src/mongo/s/balance.cpp +++ b/src/mongo/s/balance.cpp @@ -64,12 +64,11 @@ namespace mongo { - using std::unique_ptr; - using std::shared_ptr; - using std::unique_ptr; using std::map; using std::set; + using std::shared_ptr; using std::string; + using std::unique_ptr; using std::vector; MONGO_FP_DECLARE(skipBalanceRound); diff --git a/src/mongo/s/catalog/legacy/cluster_client_internal.cpp b/src/mongo/s/catalog/legacy/cluster_client_internal.cpp index d4d92cc4ded..5af263b5e56 100644 --- a/src/mongo/s/catalog/legacy/cluster_client_internal.cpp +++ b/src/mongo/s/catalog/legacy/cluster_client_internal.cpp @@ -44,10 +44,9 @@ namespace mongo { - using std::unique_ptr; - using std::unique_ptr; using std::endl; using std::string; + using std::unique_ptr; using std::vector; using mongoutils::str::stream; diff --git a/src/mongo/s/catalog/legacy/config_upgrade_helpers.cpp b/src/mongo/s/catalog/legacy/config_upgrade_helpers.cpp index 64b6f201f3e..dfde57d6774 100644 --- a/src/mongo/s/catalog/legacy/config_upgrade_helpers.cpp +++ b/src/mongo/s/catalog/legacy/config_upgrade_helpers.cpp @@ -45,10 +45,9 @@ namespace mongo { - using std::unique_ptr; - using std::unique_ptr; using std::endl; using std::string; + using std::unique_ptr; using mongoutils::str::stream; diff --git a/src/mongo/s/catalog/legacy/distlock.cpp b/src/mongo/s/catalog/legacy/distlock.cpp index 28b2b5065f3..692b27d4aa1 100644 --- a/src/mongo/s/catalog/legacy/distlock.cpp +++ b/src/mongo/s/catalog/legacy/distlock.cpp @@ -43,13 +43,12 @@ namespace mongo { - using std::unique_ptr; - using std::unique_ptr; using std::endl; using std::list; using std::set; using std::string; using std::stringstream; + using std::unique_ptr; using std::vector; LabeledLevel DistributedLock::logLvl( 1 ); diff --git a/src/mongo/s/collection_metadata_test.cpp b/src/mongo/s/collection_metadata_test.cpp index ed160ed5164..8774d209e03 100644 --- a/src/mongo/s/collection_metadata_test.cpp +++ b/src/mongo/s/collection_metadata_test.cpp @@ -47,10 +47,9 @@ namespace { using namespace mongo; - using std::unique_ptr; - using std::unique_ptr; using std::make_pair; using std::string; + using std::unique_ptr; using std::vector; const std::string CONFIG_HOST_PORT = "$dummy_config:27017"; diff --git a/src/mongo/s/config.cpp b/src/mongo/s/config.cpp index 1a4cdeb4d09..0a1904c9552 100644 --- a/src/mongo/s/config.cpp +++ b/src/mongo/s/config.cpp @@ -56,11 +56,10 @@ namespace mongo { - using std::unique_ptr; - using std::unique_ptr; using std::endl; using std::set; using std::string; + using std::unique_ptr; using std::vector; CollectionInfo::CollectionInfo(const CollectionType& coll) { diff --git a/src/mongo/s/metadata_loader_test.cpp b/src/mongo/s/metadata_loader_test.cpp index 31cd8af70a5..ad98acf1e94 100644 --- a/src/mongo/s/metadata_loader_test.cpp +++ b/src/mongo/s/metadata_loader_test.cpp @@ -50,7 +50,6 @@ namespace { using namespace mongo; using std::unique_ptr; - using std::unique_ptr; using std::string; using std::vector; diff --git a/src/mongo/s/shard_key_pattern.cpp b/src/mongo/s/shard_key_pattern.cpp index f53c20136ef..f48088e9837 100644 --- a/src/mongo/s/shard_key_pattern.cpp +++ b/src/mongo/s/shard_key_pattern.cpp @@ -40,13 +40,12 @@ namespace mongo { - using std::unique_ptr; + using std::make_pair; + using std::pair; using std::shared_ptr; + using std::string; using std::unique_ptr; - using std::pair; - using std::make_pair; using std::vector; - using std::string; using pathsupport::EqualityMatches; using mongoutils::str::stream; diff --git a/src/mongo/s/write_ops/batch_upconvert.cpp b/src/mongo/s/write_ops/batch_upconvert.cpp index 26a8b8b2da0..ee02c17744a 100644 --- a/src/mongo/s/write_ops/batch_upconvert.cpp +++ b/src/mongo/s/write_ops/batch_upconvert.cpp @@ -43,10 +43,9 @@ namespace mongo { - using std::unique_ptr; using mongoutils::str::stream; - using std::unique_ptr; using std::string; + using std::unique_ptr; using std::vector; void msgToBatchRequests( const Message& msg, vector<BatchedCommandRequest*>* requests ) { diff --git a/src/mongo/scripting/engine.cpp b/src/mongo/scripting/engine.cpp index 67f2d12d0f0..6c104b50339 100644 --- a/src/mongo/scripting/engine.cpp +++ b/src/mongo/scripting/engine.cpp @@ -47,12 +47,11 @@ namespace mongo { - using std::unique_ptr; - using std::shared_ptr; - using std::unique_ptr; using std::endl; using std::set; + using std::shared_ptr; using std::string; + using std::unique_ptr; AtomicInt64 Scope::_lastVersion(1); |