summaryrefslogtreecommitdiff
path: root/db/query.cpp
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2009-02-25 12:37:15 -0500
committerAaron <aaron@10gen.com>2009-02-25 12:37:15 -0500
commit2338122f64b65e52c94e0b9a468ae6253ecb63ae (patch)
tree046e7c5363e82d8c7556f36b42438e36ec551e05 /db/query.cpp
parentadeeae1f2f6d92266b5bdb73774ec076477ce935 (diff)
downloadmongo-2338122f64b65e52c94e0b9a468ae6253ecb63ae.tar.gz
Stack allocate original op
Diffstat (limited to 'db/query.cpp')
-rw-r--r--db/query.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/db/query.cpp b/db/query.cpp
index 6324e0fea6f..aeab529380f 100644
--- a/db/query.cpp
+++ b/db/query.cpp
@@ -395,8 +395,8 @@ namespace mongo {
}
QueryPlanSet qps( ns, pattern, emptyObj );
- auto_ptr< UpdateOp > original( new UpdateOp() );
- shared_ptr< UpdateOp > u = qps.runOp( *original );
+ UpdateOp original;
+ shared_ptr< UpdateOp > u = qps.runOp( original );
massert( u->exceptionMessage(), u->complete() );
auto_ptr< Cursor > c = u->c();
if ( c->ok() ) {
@@ -751,8 +751,8 @@ namespace mongo {
return d->nrecords;
}
QueryPlanSet qps( ns, query, emptyObj );
- auto_ptr< CountOp > original( new CountOp( cmd ) );
- shared_ptr< CountOp > res = qps.runOp( *original );
+ CountOp original( cmd );
+ shared_ptr< CountOp > res = qps.runOp( original );
if ( !res->complete() ) {
log() << "Count with ns: " << ns << " and query: " << query
<< " failed with exception: " << res->exceptionMessage()
@@ -995,8 +995,8 @@ namespace mongo {
}
QueryPlanSet qps( ns, query, order, &hint );
- auto_ptr< DoQueryOp > original( new DoQueryOp( ntoskip, ntoreturn, order, wantMore, explain, *filter, queryOptions ) );
- shared_ptr< DoQueryOp > o = qps.runOp( *original );
+ DoQueryOp original( ntoskip, ntoreturn, order, wantMore, explain, *filter, queryOptions );
+ shared_ptr< DoQueryOp > o = qps.runOp( original );
DoQueryOp &dqo = *o;
massert( dqo.exceptionMessage(), dqo.complete() );
n = dqo.n();