summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/accumulator_first.cpp
diff options
context:
space:
mode:
authorMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 00:22:50 -0400
committerMark Benvenuto <mark.benvenuto@mongodb.com>2015-06-20 10:56:02 -0400
commit9c2ed42daa8fbbef4a919c21ec564e2db55e8d60 (patch)
tree3814f79c10d7b490948d8cb7b112ac1dd41ceff1 /src/mongo/db/pipeline/accumulator_first.cpp
parent01965cf52bce6976637ecb8f4a622aeb05ab256a (diff)
downloadmongo-9c2ed42daa8fbbef4a919c21ec564e2db55e8d60.tar.gz
SERVER-18579: Clang-Format - reformat code, no comment reflow
Diffstat (limited to 'src/mongo/db/pipeline/accumulator_first.cpp')
-rw-r--r--src/mongo/db/pipeline/accumulator_first.cpp54
1 files changed, 26 insertions, 28 deletions
diff --git a/src/mongo/db/pipeline/accumulator_first.cpp b/src/mongo/db/pipeline/accumulator_first.cpp
index ed49fe163f1..9425199793f 100644
--- a/src/mongo/db/pipeline/accumulator_first.cpp
+++ b/src/mongo/db/pipeline/accumulator_first.cpp
@@ -33,40 +33,38 @@
namespace mongo {
- using boost::intrusive_ptr;
+using boost::intrusive_ptr;
- void AccumulatorFirst::processInternal(const Value& input, bool merging) {
- /* only remember the first value seen */
- if (!_haveFirst) {
- // can't use pValue.missing() since we want the first value even if missing
- _haveFirst = true;
- _first = input;
- _memUsageBytes = sizeof(*this) + input.getApproximateSize() - sizeof(Value);
- }
+void AccumulatorFirst::processInternal(const Value& input, bool merging) {
+ /* only remember the first value seen */
+ if (!_haveFirst) {
+ // can't use pValue.missing() since we want the first value even if missing
+ _haveFirst = true;
+ _first = input;
+ _memUsageBytes = sizeof(*this) + input.getApproximateSize() - sizeof(Value);
}
+}
- Value AccumulatorFirst::getValue(bool toBeMerged) const {
- return _first;
- }
+Value AccumulatorFirst::getValue(bool toBeMerged) const {
+ return _first;
+}
- AccumulatorFirst::AccumulatorFirst()
- : _haveFirst(false)
- {
- _memUsageBytes = sizeof(*this);
- }
+AccumulatorFirst::AccumulatorFirst() : _haveFirst(false) {
+ _memUsageBytes = sizeof(*this);
+}
- void AccumulatorFirst::reset() {
- _haveFirst = false;
- _first = Value();
- _memUsageBytes = sizeof(*this);
- }
+void AccumulatorFirst::reset() {
+ _haveFirst = false;
+ _first = Value();
+ _memUsageBytes = sizeof(*this);
+}
- intrusive_ptr<Accumulator> AccumulatorFirst::create() {
- return new AccumulatorFirst();
- }
+intrusive_ptr<Accumulator> AccumulatorFirst::create() {
+ return new AccumulatorFirst();
+}
- const char *AccumulatorFirst::getOpName() const {
- return "$first";
- }
+const char* AccumulatorFirst::getOpName() const {
+ return "$first";
+}
}