Skip to content

Commit 1b62980

Browse files
committed
CXX-276 Fix warning about auto_ptr to incomplete type
1 parent aed32aa commit 1b62980

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed

src/mongo/client/dbclient.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1604,6 +1604,12 @@ namespace mongo {
16041604
clientSet = rsClient;
16051605
}
16061606

1607+
std::auto_ptr<DBClientCursor> DBClientConnection::query(const std::string &ns, Query query, int nToReturn, int nToSkip,
1608+
const BSONObj *fieldsToReturn, int queryOptions, int batchSize ) {
1609+
checkConnection();
1610+
return DBClientBase::query( ns, query, nToReturn, nToSkip, fieldsToReturn, queryOptions , batchSize );
1611+
}
1612+
16071613
unsigned long long DBClientConnection::query(
16081614
stdx::function<void(DBClientCursorBatchIterator &)> f,
16091615
const string& ns,

src/mongo/client/dbclientinterface.h

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1548,10 +1548,7 @@ namespace mongo {
15481548
virtual void logout(const std::string& dbname, BSONObj& info);
15491549

15501550
virtual std::auto_ptr<DBClientCursor> query(const std::string &ns, Query query=Query(), int nToReturn = 0, int nToSkip = 0,
1551-
const BSONObj *fieldsToReturn = 0, int queryOptions = 0 , int batchSize = 0 ) {
1552-
checkConnection();
1553-
return DBClientBase::query( ns, query, nToReturn, nToSkip, fieldsToReturn, queryOptions , batchSize );
1554-
}
1551+
const BSONObj *fieldsToReturn = 0, int queryOptions = 0 , int batchSize = 0 );
15551552

15561553
virtual unsigned long long query( stdx::function<void(DBClientCursorBatchIterator &)> f,
15571554
const std::string& ns,

src/mongo/client/scoped_db_conn_test.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
*/
1515

1616
#include "mongo/platform/basic.h"
17+
1718
#include "mongo/base/init.h"
1819
#include "mongo/client/connpool.h"
20+
#include "mongo/client/dbclientcursor.h"
1921
#include "mongo/db/dbmessage.h"
2022
#include "mongo/platform/cstdint.h"
2123
#include "mongo/util/fail_point_service.h"

0 commit comments

Comments
 (0)