summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/pipeline_metadata_tree.h
diff options
context:
space:
mode:
authorclang-format-7.0.1 <adam.martin@10gen.com>2019-07-26 18:42:24 -0400
committerADAM David Alan Martin <adam.martin@10gen.com>2019-07-26 18:42:24 -0400
commitc1a45ebbb0530e3d0201321d725527f1eb83ffce (patch)
treef523079dc5ded3052eefbdcaae424b7502df5b25 /src/mongo/db/pipeline/pipeline_metadata_tree.h
parentc9599d8610c3da0b7c3da65667aff821063cf5b9 (diff)
downloadmongo-c1a45ebbb0530e3d0201321d725527f1eb83ffce.tar.gz
Apply formatting per `clang-format-7.0.1`
Diffstat (limited to 'src/mongo/db/pipeline/pipeline_metadata_tree.h')
-rw-r--r--src/mongo/db/pipeline/pipeline_metadata_tree.h17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/mongo/db/pipeline/pipeline_metadata_tree.h b/src/mongo/db/pipeline/pipeline_metadata_tree.h
index fe8c1f02770..1a22c452590 100644
--- a/src/mongo/db/pipeline/pipeline_metadata_tree.h
+++ b/src/mongo/db/pipeline/pipeline_metadata_tree.h
@@ -117,8 +117,7 @@ inline auto findStageContents(const NamespaceString& ns,
auto it = initialStageContents.find(ns);
uassert(51213,
str::stream() << "Metadata to initialize an aggregation pipeline associated with "
- << ns.coll()
- << " is missing.",
+ << ns.coll() << " is missing.",
it != initialStageContents.end());
return it->second;
}
@@ -154,7 +153,7 @@ inline auto makeAdditionalChildren(
std::vector<T> offTheEndContents;
if (auto lookupSource = dynamic_cast<const DocumentSourceLookUp*>(&source);
lookupSource && lookupSource->wasConstructedWithPipelineSyntax()) {
- auto[child, offTheEndReshaper] =
+ auto [child, offTheEndReshaper] =
makeTreeWithOffTheEndStage(std::move(initialStageContents),
lookupSource->getResolvedIntrospectionPipeline(),
propagator);
@@ -166,7 +165,7 @@ inline auto makeAdditionalChildren(
facetSource->getFacetPipelines().end(),
std::back_inserter(children),
[&](const auto& fPipe) {
- auto[child, offTheEndReshaper] = makeTreeWithOffTheEndStage(
+ auto [child, offTheEndReshaper] = makeTreeWithOffTheEndStage(
std::move(initialStageContents), *fPipe.pipeline, propagator);
offTheEndContents.push_back(offTheEndReshaper(child.get().contents));
return std::move(*child);
@@ -192,13 +191,15 @@ inline auto makeStage(
auto contents = (previous) ? reshapeContents(previous.get().contents)
: findStageContents(source.getContext()->ns, initialStageContents);
- auto[additionalChildren, offTheEndContents] =
+ auto [additionalChildren, offTheEndContents] =
makeAdditionalChildren(std::move(initialStageContents), source, propagator, contents);
auto principalChild = previous ? std::make_unique<Stage<T>>(std::move(previous.get()))
: std::unique_ptr<Stage<T>>();
- std::function<T(const T&)> reshaper([&, offTheEndContents{std::move(offTheEndContents)} ](
- const T& reshapable) { return propagator(reshapable, offTheEndContents, source); });
+ std::function<T(const T&)> reshaper(
+ [&, offTheEndContents{std::move(offTheEndContents)}](const T& reshapable) {
+ return propagator(reshapable, offTheEndContents, source);
+ });
return std::pair(
boost::optional<Stage<T>>(
Stage(std::move(contents), std::move(principalChild), std::move(additionalChildren))),
@@ -278,7 +279,7 @@ inline std::pair<boost::optional<Stage<T>>, T> makeTree(
findStageContents(pipeline.getContext()->ns, initialStageContents));
}
- auto && [ finalStage, reshaper ] =
+ auto&& [finalStage, reshaper] =
detail::makeTreeWithOffTheEndStage(std::move(initialStageContents), pipeline, propagator);
return std::pair(std::move(*finalStage), reshaper(finalStage.get().contents));