From 134a4083953270e8a11430395357fb70a29047ad Mon Sep 17 00:00:00 2001 From: "clang-format-7.0.1" Date: Fri, 26 Jul 2019 18:20:35 -0400 Subject: SERVER-41772 Apply clang-format 7.0.1 to the codebase --- src/mongo/db/update/update_object_node.cpp | 33 ++++++++++++------------------ 1 file changed, 13 insertions(+), 20 deletions(-) (limited to 'src/mongo/db/update/update_object_node.cpp') diff --git a/src/mongo/db/update/update_object_node.cpp b/src/mongo/db/update/update_object_node.cpp index 6298b8389c5..27863d15ee1 100644 --- a/src/mongo/db/update/update_object_node.cpp +++ b/src/mongo/db/update/update_object_node.cpp @@ -62,8 +62,7 @@ StatusWith parseArrayFilterIdentifier( return Status(ErrorCodes::BadValue, str::stream() << "Cannot have array filter identifier (i.e. '$[]') " "element in the first position in path '" - << fieldRef.dottedField() - << "'"); + << fieldRef.dottedField() << "'"); } auto identifier = field.substr(2, field.size() - 3); @@ -71,9 +70,7 @@ StatusWith parseArrayFilterIdentifier( if (!identifier.empty() && arrayFilters.find(identifier) == arrayFilters.end()) { return Status(ErrorCodes::BadValue, str::stream() << "No array filter found for identifier '" << identifier - << "' in path '" - << fieldRef.dottedField() - << "'"); + << "' in path '" << fieldRef.dottedField() << "'"); } if (!identifier.empty()) { @@ -190,7 +187,7 @@ void applyChild(const UpdateNode& child, BSONObj makeBSONForOperator(const std::vector>& updatesForOp) { BSONObjBuilder bob; - for (const auto & [ path, value ] : updatesForOp) + for (const auto& [path, value] : updatesForOp) bob << path << value.firstElement(); return bob.obj(); } @@ -228,8 +225,8 @@ StatusWith UpdateObjectNode::parseAndMerge( // be a string value. if (BSONType::String != modExpr.type()) { return Status(ErrorCodes::BadValue, - str::stream() << "The 'to' field for $rename must be a string: " - << modExpr); + str::stream() + << "The 'to' field for $rename must be a string: " << modExpr); } fieldRef.parse(modExpr.valueStringData()); @@ -250,8 +247,7 @@ StatusWith UpdateObjectNode::parseAndMerge( if (positional && positionalCount > 1) { return Status(ErrorCodes::BadValue, str::stream() << "Too many positional (i.e. '$') elements found in path '" - << fieldRef.dottedField() - << "'"); + << fieldRef.dottedField() << "'"); } if (positional && positionalIndex == 0) { @@ -259,8 +255,7 @@ StatusWith UpdateObjectNode::parseAndMerge( ErrorCodes::BadValue, str::stream() << "Cannot have positional (i.e. '$') element in the first position in path '" - << fieldRef.dottedField() - << "'"); + << fieldRef.dottedField() << "'"); } // Construct and initialize the leaf node. @@ -298,8 +293,7 @@ StatusWith UpdateObjectNode::parseAndMerge( return Status(ErrorCodes::ConflictingUpdateOperators, str::stream() << "Updating the path '" << fieldRef.dottedField() << "' would create a conflict at '" - << fieldRef.dottedSubstring(0, i + 1) - << "'"); + << fieldRef.dottedSubstring(0, i + 1) << "'"); } } else { std::unique_ptr ownedChild; @@ -335,10 +329,9 @@ StatusWith UpdateObjectNode::parseAndMerge( if (current->getChild(childName)) { return Status(ErrorCodes::ConflictingUpdateOperators, - str::stream() << "Updating the path '" << fieldRef.dottedField() - << "' would create a conflict at '" - << fieldRef.dottedField() - << "'"); + str::stream() + << "Updating the path '" << fieldRef.dottedField() + << "' would create a conflict at '" << fieldRef.dottedField() << "'"); } current->setChild(std::move(childName), std::move(leaf)); @@ -389,12 +382,12 @@ BSONObj UpdateObjectNode::serialize() const { BSONObjBuilder bob; - for (const auto & [ pathPrefix, child ] : _children) { + for (const auto& [pathPrefix, child] : _children) { auto path = FieldRef(pathPrefix); child->produceSerializationMap(&path, &operatorOrientedUpdates); } - for (const auto & [ op, updates ] : operatorOrientedUpdates) + for (const auto& [op, updates] : operatorOrientedUpdates) bob << op << makeBSONForOperator(updates); return bob.obj(); -- cgit v1.2.1