diff options
author | Eliot Horowitz <eliot@10gen.com> | 2010-05-07 17:25:57 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-05-07 17:25:57 -0400 |
commit | 740cc1308e2e672d346e44d4b989c57c12a5bcd5 (patch) | |
tree | 2f66f4bba01c1bee63d5aa80739dd1afa9bce078 /db/index_geo2d.cpp | |
parent | 8717179475a98d264770a70c5582bd9023271cbd (diff) | |
download | mongo-740cc1308e2e672d346e44d4b989c57c12a5bcd5.tar.gz |
auto_ptr -> shared_ptr for Cursor objects
Diffstat (limited to 'db/index_geo2d.cpp')
-rw-r--r-- | db/index_geo2d.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/db/index_geo2d.cpp b/db/index_geo2d.cpp index 74e88660878..4450eaf84d5 100644 --- a/db/index_geo2d.cpp +++ b/db/index_geo2d.cpp @@ -477,7 +477,7 @@ namespace mongo { return _spec->getDetails(); } - virtual auto_ptr<Cursor> newCursor( const BSONObj& query , const BSONObj& order , int numWanted ) const; + virtual shared_ptr<Cursor> newCursor( const BSONObj& query , const BSONObj& order , int numWanted ) const; virtual IndexSuitability suitability( const BSONObj& query , const BSONObj& order ) const { BSONElement e = query.getFieldDotted(_geo.c_str()); @@ -1468,7 +1468,7 @@ namespace mongo { }; - auto_ptr<Cursor> Geo2dType::newCursor( const BSONObj& query , const BSONObj& order , int numWanted ) const { + shared_ptr<Cursor> Geo2dType::newCursor( const BSONObj& query , const BSONObj& order , int numWanted ) const { if ( numWanted < 0 ) numWanted = numWanted * -1; else if ( numWanted == 0 ) @@ -1504,7 +1504,7 @@ namespace mongo { } shared_ptr<GeoSearch> s( new GeoSearch( this , _tohash(e) , numWanted , query , maxDistance ) ); s->exec(); - auto_ptr<Cursor> c; + shared_ptr<Cursor> c; c.reset( new GeoSearchCursor( s ) ); return c; } @@ -1515,13 +1515,13 @@ namespace mongo { string type = e.fieldName(); if ( type == "$center" ){ uassert( 13059 , "$center has to take an object or array" , e.isABSONObj() ); - auto_ptr<Cursor> c; + shared_ptr<Cursor> c; c.reset( new GeoCircleBrowse( this , e.embeddedObjectUserCheck() , query ) ); return c; } else if ( type == "$box" ){ uassert( 13065 , "$box has to take an object or array" , e.isABSONObj() ); - auto_ptr<Cursor> c; + shared_ptr<Cursor> c; c.reset( new GeoBoxBrowse( this , e.embeddedObjectUserCheck() , query ) ); return c; } |