diff options
Diffstat (limited to 'src/mongo/db/pipeline/accumulator_js_reduce.h')
-rw-r--r-- | src/mongo/db/pipeline/accumulator_js_reduce.h | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/src/mongo/db/pipeline/accumulator_js_reduce.h b/src/mongo/db/pipeline/accumulator_js_reduce.h index 5843f893a18..fe87b2b359a 100644 --- a/src/mongo/db/pipeline/accumulator_js_reduce.h +++ b/src/mongo/db/pipeline/accumulator_js_reduce.h @@ -42,14 +42,14 @@ class AccumulatorInternalJsReduce final : public AccumulatorState { public: static constexpr auto kAccumulatorName = "$_internalJsReduce"_sd; - static boost::intrusive_ptr<AccumulatorState> create( - const boost::intrusive_ptr<ExpressionContext>& expCtx, StringData funcSource); + static boost::intrusive_ptr<AccumulatorState> create(ExpressionContext* const expCtx, + StringData funcSource); - static AccumulationExpression parseInternalJsReduce( - boost::intrusive_ptr<ExpressionContext> expCtx, BSONElement elem, VariablesParseState vps); + static AccumulationExpression parseInternalJsReduce(ExpressionContext* const expCtx, + BSONElement elem, + VariablesParseState vps); - AccumulatorInternalJsReduce(const boost::intrusive_ptr<ExpressionContext>& expCtx, - StringData funcSource) + AccumulatorInternalJsReduce(ExpressionContext* const expCtx, StringData funcSource) : AccumulatorState(expCtx), _funcSource(funcSource) { _memUsageBytes = sizeof(*this); } @@ -85,14 +85,13 @@ public: // An AccumulatorState instance only owns its "static" arguments: those that don't need to be // evaluated per input document. - static boost::intrusive_ptr<AccumulatorState> create( - const boost::intrusive_ptr<ExpressionContext>& expCtx, - std::string init, - std::string accumulate, - std::string merge, - boost::optional<std::string> finalize); - - static AccumulationExpression parse(boost::intrusive_ptr<ExpressionContext> expCtx, + static boost::intrusive_ptr<AccumulatorState> create(ExpressionContext* const expCtx, + std::string init, + std::string accumulate, + std::string merge, + boost::optional<std::string> finalize); + + static AccumulationExpression parse(ExpressionContext* const expCtx, BSONElement elem, VariablesParseState vps); @@ -106,7 +105,7 @@ public: void startNewGroup(Value const& input) final; private: - AccumulatorJs(const boost::intrusive_ptr<ExpressionContext>& expCtx, + AccumulatorJs(ExpressionContext* const expCtx, std::string init, std::string accumulate, std::string merge, |