diff options
author | Charlie Swanson <charlie.swanson@mongodb.com> | 2015-07-01 16:47:20 -0400 |
---|---|---|
committer | Charlie Swanson <charlie.swanson@mongodb.com> | 2015-07-13 17:41:39 -0400 |
commit | 1527a67262baf2d80776f86d4af0e42d53aa3eec (patch) | |
tree | 802170077582f8d30a12e548b2e6ce6578275443 /src/mongo/db/pipeline/accumulator_avg.cpp | |
parent | 908313432e597623361df39339cee452176fd7b2 (diff) | |
download | mongo-1527a67262baf2d80776f86d4af0e42d53aa3eec.tar.gz |
SERVER-19105 Add macro to register Accumulators, move REGISTER_EXPRESSION to header
Diffstat (limited to 'src/mongo/db/pipeline/accumulator_avg.cpp')
-rw-r--r-- | src/mongo/db/pipeline/accumulator_avg.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/mongo/db/pipeline/accumulator_avg.cpp b/src/mongo/db/pipeline/accumulator_avg.cpp index ad027e7709d..cf2d5c9b677 100644 --- a/src/mongo/db/pipeline/accumulator_avg.cpp +++ b/src/mongo/db/pipeline/accumulator_avg.cpp @@ -37,6 +37,12 @@ namespace mongo { using boost::intrusive_ptr; +REGISTER_ACCUMULATOR(avg, AccumulatorAvg::create); + +const char* AccumulatorAvg::getOpName() const { + return "$avg"; +} + namespace { const char subTotalName[] = "subTotal"; const char countName[] = "count"; @@ -83,8 +89,4 @@ void AccumulatorAvg::reset() { _total = 0; _count = 0; } - -const char* AccumulatorAvg::getOpName() const { - return "$avg"; -} } |