diff options
author | Andrew Morrow <acm@mongodb.com> | 2015-01-09 18:02:51 -0500 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2015-01-15 07:04:26 -0500 |
commit | 9f30e21c627e4c73ab0b44e45b7ce657b3e2619f (patch) | |
tree | 4863e66baca59d2733c4d8090ed962ef60908d6a /src/mongo/db/matcher | |
parent | 44cafa7dddde7510aa0a05efce807a2e294fdc6d (diff) | |
download | mongo-9f30e21c627e4c73ab0b44e45b7ce657b3e2619f.tar.gz |
SERVER-13256 Add usings and qualifications for names from namespace std
Diffstat (limited to 'src/mongo/db/matcher')
-rw-r--r-- | src/mongo/db/matcher/expression.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/matcher/expression_array_test.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/matcher/expression_geo_test.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/matcher/expression_leaf_test.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/matcher/expression_parser.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/matcher/expression_parser_array_test.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/matcher/expression_parser_geo.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/matcher/expression_parser_leaf_test.cpp | 3 | ||||
-rw-r--r-- | src/mongo/db/matcher/expression_parser_text.cpp | 3 | ||||
-rw-r--r-- | src/mongo/db/matcher/expression_text.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/matcher/expression_tree_test.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/matcher/expression_where.cpp | 5 | ||||
-rw-r--r-- | src/mongo/db/matcher/expression_where_noop.cpp | 4 | ||||
-rw-r--r-- | src/mongo/db/matcher/match_details.cpp | 2 | ||||
-rw-r--r-- | src/mongo/db/matcher/path_test.cpp | 2 |
15 files changed, 37 insertions, 0 deletions
diff --git a/src/mongo/db/matcher/expression.cpp b/src/mongo/db/matcher/expression.cpp index 098c049c6e8..e4778bb75d9 100644 --- a/src/mongo/db/matcher/expression.cpp +++ b/src/mongo/db/matcher/expression.cpp @@ -36,6 +36,8 @@ namespace mongo { + using std::string; + MatchExpression::MatchExpression( MatchType type ) : _matchType( type ) { } diff --git a/src/mongo/db/matcher/expression_array_test.cpp b/src/mongo/db/matcher/expression_array_test.cpp index 626ac72409e..96a89254a34 100644 --- a/src/mongo/db/matcher/expression_array_test.cpp +++ b/src/mongo/db/matcher/expression_array_test.cpp @@ -38,6 +38,8 @@ namespace mongo { + using std::auto_ptr; + TEST( ElemMatchObjectMatchExpression, MatchesElementSingle ) { BSONObj baseOperand = BSON( "b" << 5 ); BSONObj match = BSON( "a" << BSON_ARRAY( BSON( "b" << 5.0 ) ) ); diff --git a/src/mongo/db/matcher/expression_geo_test.cpp b/src/mongo/db/matcher/expression_geo_test.cpp index ab1546e012d..21ec6785b60 100644 --- a/src/mongo/db/matcher/expression_geo_test.cpp +++ b/src/mongo/db/matcher/expression_geo_test.cpp @@ -40,6 +40,8 @@ namespace mongo { + using std::auto_ptr; + TEST( ExpressionGeoTest, Geo1 ) { BSONObj query = fromjson("{loc:{$within:{$box:[{x: 4, y:4},[6,6]]}}}"); diff --git a/src/mongo/db/matcher/expression_leaf_test.cpp b/src/mongo/db/matcher/expression_leaf_test.cpp index b28f3f13713..ed2f7b259d9 100644 --- a/src/mongo/db/matcher/expression_leaf_test.cpp +++ b/src/mongo/db/matcher/expression_leaf_test.cpp @@ -38,6 +38,8 @@ namespace mongo { + using std::string; + TEST( EqOp, MatchesElement ) { BSONObj operand = BSON( "a" << 5 ); BSONObj match = BSON( "a" << 5.0 ); diff --git a/src/mongo/db/matcher/expression_parser.cpp b/src/mongo/db/matcher/expression_parser.cpp index 8c7ac2e588f..40fd48e5ea2 100644 --- a/src/mongo/db/matcher/expression_parser.cpp +++ b/src/mongo/db/matcher/expression_parser.cpp @@ -63,6 +63,8 @@ namespace { namespace mongo { + using std::string; + StatusWithMatchExpression MatchExpressionParser::_parseComparison( const char* name, ComparisonMatchExpression* cmp, const BSONElement& e ) { diff --git a/src/mongo/db/matcher/expression_parser_array_test.cpp b/src/mongo/db/matcher/expression_parser_array_test.cpp index 1d4bdf54ee8..e58bb4683d5 100644 --- a/src/mongo/db/matcher/expression_parser_array_test.cpp +++ b/src/mongo/db/matcher/expression_parser_array_test.cpp @@ -39,6 +39,8 @@ namespace mongo { + using std::string; + TEST( MatchExpressionParserArrayTest, Size1 ) { BSONObj query = BSON( "x" << BSON( "$size" << 2 ) ); StatusWithMatchExpression result = MatchExpressionParser::parse( query ); diff --git a/src/mongo/db/matcher/expression_parser_geo.cpp b/src/mongo/db/matcher/expression_parser_geo.cpp index 346b7a148d4..72145c029b1 100644 --- a/src/mongo/db/matcher/expression_parser_geo.cpp +++ b/src/mongo/db/matcher/expression_parser_geo.cpp @@ -37,6 +37,8 @@ namespace mongo { + using std::auto_ptr; + StatusWithMatchExpression expressionParserGeoCallbackReal( const char* name, int type, const BSONObj& section ) { diff --git a/src/mongo/db/matcher/expression_parser_leaf_test.cpp b/src/mongo/db/matcher/expression_parser_leaf_test.cpp index 507b781fdd9..ad28bfd6641 100644 --- a/src/mongo/db/matcher/expression_parser_leaf_test.cpp +++ b/src/mongo/db/matcher/expression_parser_leaf_test.cpp @@ -42,6 +42,9 @@ namespace mongo { + using std::endl; + using std::string; + TEST( MatchExpressionParserLeafTest, SimpleEQ2 ) { BSONObj query = BSON( "x" << BSON( "$eq" << 2 ) ); StatusWithMatchExpression result = MatchExpressionParser::parse( query ); diff --git a/src/mongo/db/matcher/expression_parser_text.cpp b/src/mongo/db/matcher/expression_parser_text.cpp index 86b16e71130..ad8114c88e8 100644 --- a/src/mongo/db/matcher/expression_parser_text.cpp +++ b/src/mongo/db/matcher/expression_parser_text.cpp @@ -37,6 +37,9 @@ namespace mongo { + using std::auto_ptr; + using std::string; + StatusWithMatchExpression expressionParserTextCallbackReal( const BSONObj& queryObj ) { // Validate queryObj, but defer construction of FTSQuery (which requires access to the // target namespace) until stage building time. diff --git a/src/mongo/db/matcher/expression_text.cpp b/src/mongo/db/matcher/expression_text.cpp index c77217d2d10..760491b97c5 100644 --- a/src/mongo/db/matcher/expression_text.cpp +++ b/src/mongo/db/matcher/expression_text.cpp @@ -36,6 +36,8 @@ namespace mongo { + using std::string; + Status TextMatchExpression::init( const string& query, const string& language ) { _query = query; _language = language; diff --git a/src/mongo/db/matcher/expression_tree_test.cpp b/src/mongo/db/matcher/expression_tree_test.cpp index c0ba4cead87..27516ff4344 100644 --- a/src/mongo/db/matcher/expression_tree_test.cpp +++ b/src/mongo/db/matcher/expression_tree_test.cpp @@ -38,6 +38,8 @@ namespace mongo { + using std::auto_ptr; + TEST( NotMatchExpression, MatchesScalar ) { BSONObj baseOperand = BSON( "$lt" << 5 ); auto_ptr<ComparisonMatchExpression> lt( new LTMatchExpression() ); diff --git a/src/mongo/db/matcher/expression_where.cpp b/src/mongo/db/matcher/expression_where.cpp index f52d5c77f23..01a9e5b0aac 100644 --- a/src/mongo/db/matcher/expression_where.cpp +++ b/src/mongo/db/matcher/expression_where.cpp @@ -42,6 +42,11 @@ namespace mongo { + using std::auto_ptr; + using std::endl; + using std::string; + using std::stringstream; + class WhereMatchExpression : public MatchExpression { public: WhereMatchExpression(OperationContext* txn) diff --git a/src/mongo/db/matcher/expression_where_noop.cpp b/src/mongo/db/matcher/expression_where_noop.cpp index 5347493f12c..af1fed42521 100644 --- a/src/mongo/db/matcher/expression_where_noop.cpp +++ b/src/mongo/db/matcher/expression_where_noop.cpp @@ -38,6 +38,9 @@ namespace mongo { + using std::auto_ptr; + using std::string; + /** * Bogus no-op $where match expression to parse $where in mongos, * since mongos doesn't have script engine to compile JS functions. @@ -117,6 +120,7 @@ namespace mongo { StatusWithMatchExpression WhereCallbackNoop::parseWhere(const BSONElement& where) const { + auto_ptr<WhereNoOpMatchExpression> exp( new WhereNoOpMatchExpression() ); if ( where.type() == String || where.type() == Code ) { Status s = exp->init( where.valuestr() ); diff --git a/src/mongo/db/matcher/match_details.cpp b/src/mongo/db/matcher/match_details.cpp index 1c437129adc..6adcfcdd910 100644 --- a/src/mongo/db/matcher/match_details.cpp +++ b/src/mongo/db/matcher/match_details.cpp @@ -36,6 +36,8 @@ namespace mongo { + using std::string; + MatchDetails::MatchDetails() : _elemMatchKeyRequested() { resetOutput(); diff --git a/src/mongo/db/matcher/path_test.cpp b/src/mongo/db/matcher/path_test.cpp index 3bd3b0f4568..12091c4749c 100644 --- a/src/mongo/db/matcher/path_test.cpp +++ b/src/mongo/db/matcher/path_test.cpp @@ -37,6 +37,8 @@ namespace mongo { + using std::string; + TEST( Path, Root1 ) { ElementPath p; ASSERT( p.init( "a" ).isOK() ); |