0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

SERVER-50254 Fix compile error due to pessimising std::move

This commit is contained in:
Kaloian Manassiev 2020-08-25 02:21:19 -04:00 committed by Evergreen Agent
parent 5633aae06d
commit fadba84c0a

View File

@ -108,7 +108,7 @@ CNode disambiguateCompoundProjection(CNode project) {
auto projectionType = boost::optional<ProjectionType>{};
auto cNode = replaceCNode(project, projectionType);
if (!cNode)
return std::move(project);
return project;
switch (*projectionType) {
case ProjectionType::inclusion:
return CNode{CompoundInclusionKey{std::make_unique<CNode>(*std::move(cNode))}};