summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/accumulator_first.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/accumulator_first.cpp
parent7eb3fc28fbd9cb0464cbf6dba5ffb497ba2088e9 (diff)
downloadmongo-ffd194f68edf4a61bff35fac591452b715cff849.tar.gz
Rewrite Document and Value classes
Diffstat (limited to 'src/mongo/db/pipeline/accumulator_first.cpp')
-rwxr-xr-xsrc/mongo/db/pipeline/accumulator_first.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/mongo/db/pipeline/accumulator_first.cpp b/src/mongo/db/pipeline/accumulator_first.cpp
index 53d8f9595e9..b226fb552d6 100755
--- a/src/mongo/db/pipeline/accumulator_first.cpp
+++ b/src/mongo/db/pipeline/accumulator_first.cpp
@@ -21,12 +21,11 @@
namespace mongo {
- intrusive_ptr<const Value> AccumulatorFirst::evaluate(
- const intrusive_ptr<Document> &pDocument) const {
+ Value AccumulatorFirst::evaluate(const Document& pDocument) const {
verify(vpOperand.size() == 1);
/* only remember the first value seen */
- if (!pValue.get())
+ if (pValue.missing())
pValue = vpOperand[0]->evaluate(pDocument);
return pValue;