diff options
author | Mathias Stearn <mathias@10gen.com> | 2012-10-26 19:35:31 -0400 |
---|---|---|
committer | Mathias Stearn <mathias@10gen.com> | 2012-11-16 17:32:59 -0500 |
commit | ffd194f68edf4a61bff35fac591452b715cff849 (patch) | |
tree | 67ed1e6300f04d1333fee769e9c1ba2f8b4d41d6 /src/mongo/db/pipeline/accumulator_first.cpp | |
parent | 7eb3fc28fbd9cb0464cbf6dba5ffb497ba2088e9 (diff) | |
download | mongo-ffd194f68edf4a61bff35fac591452b715cff849.tar.gz |
Rewrite Document and Value classes
Diffstat (limited to 'src/mongo/db/pipeline/accumulator_first.cpp')
-rwxr-xr-x | src/mongo/db/pipeline/accumulator_first.cpp | 5 |
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; |