summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source_limit.cpp
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2012-10-26 19:35:31 -0400
committerMathias Stearn <mathias@10gen.com>2012-11-16 17:32:59 -0500
commitffd194f68edf4a61bff35fac591452b715cff849 (patch)
tree67ed1e6300f04d1333fee769e9c1ba2f8b4d41d6 /src/mongo/db/pipeline/document_source_limit.cpp
parent7eb3fc28fbd9cb0464cbf6dba5ffb497ba2088e9 (diff)
downloadmongo-ffd194f68edf4a61bff35fac591452b715cff849.tar.gz
Rewrite Document and Value classes
Diffstat (limited to 'src/mongo/db/pipeline/document_source_limit.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source_limit.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/mongo/db/pipeline/document_source_limit.cpp b/src/mongo/db/pipeline/document_source_limit.cpp
index 999d80f0368..86dd4f22a5c 100644
--- a/src/mongo/db/pipeline/document_source_limit.cpp
+++ b/src/mongo/db/pipeline/document_source_limit.cpp
@@ -64,20 +64,16 @@ namespace mongo {
++count;
if (count >= limit) {
-
- pCurrent.reset();
-
// This is required for the DocumentSourceCursor to release its read lock, see
// SERVER-6123.
pSource->dispose();
return false;
}
- pCurrent = pSource->getCurrent();
return pSource->advance();
}
- intrusive_ptr<Document> DocumentSourceLimit::getCurrent() {
+ Document DocumentSourceLimit::getCurrent() {
return pSource->getCurrent();
}