summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/value.cpp
diff options
context:
space:
mode:
authorclang-format-7.0.1 <adam.martin@10gen.com>2019-07-26 18:20:35 -0400
committerADAM David Alan Martin <adam.martin@10gen.com>2019-07-27 11:02:23 -0400
commit134a4083953270e8a11430395357fb70a29047ad (patch)
treedd428e1230e31d92b20b393dfdc17ffe7fa79cb6 /src/mongo/db/pipeline/value.cpp
parent1e46b5049003f427047e723ea5fab15b5a9253ca (diff)
downloadmongo-134a4083953270e8a11430395357fb70a29047ad.tar.gz
SERVER-41772 Apply clang-format 7.0.1 to the codebase
Diffstat (limited to 'src/mongo/db/pipeline/value.cpp')
-rw-r--r--src/mongo/db/pipeline/value.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/mongo/db/pipeline/value.cpp b/src/mongo/db/pipeline/value.cpp
index 52a1c5fd71d..b804adaf797 100644
--- a/src/mongo/db/pipeline/value.cpp
+++ b/src/mongo/db/pipeline/value.cpp
@@ -389,8 +389,7 @@ void Value::addToBsonObj(BSONObjBuilder* builder,
size_t recursionLevel) const {
uassert(ErrorCodes::Overflow,
str::stream() << "cannot convert document to BSON because it exceeds the limit of "
- << BSONDepth::getMaxAllowableDepth()
- << " levels of nesting",
+ << BSONDepth::getMaxAllowableDepth() << " levels of nesting",
recursionLevel <= BSONDepth::getMaxAllowableDepth());
if (getType() == BSONType::Object) {
@@ -411,8 +410,7 @@ void Value::addToBsonObj(BSONObjBuilder* builder,
void Value::addToBsonArray(BSONArrayBuilder* builder, size_t recursionLevel) const {
uassert(ErrorCodes::Overflow,
str::stream() << "cannot convert document to BSON because it exceeds the limit of "
- << BSONDepth::getMaxAllowableDepth()
- << " levels of nesting",
+ << BSONDepth::getMaxAllowableDepth() << " levels of nesting",
recursionLevel <= BSONDepth::getMaxAllowableDepth());
// If this Value is empty, do nothing to avoid incrementing the builder's counter.
@@ -704,7 +702,7 @@ int Value::compare(const Value& rL,
case Date: // signed
return cmp(rL._storage.dateValue, rR._storage.dateValue);
- // Numbers should compare by equivalence even if different types
+ // Numbers should compare by equivalence even if different types
case NumberDecimal: {
switch (rType) {
@@ -1078,9 +1076,9 @@ size_t Value::getApproximateSize() const {
case Symbol:
case BinData:
case String:
- return sizeof(Value) + (_storage.shortStr
- ? 0 // string stored inline, so no extra mem usage
- : sizeof(RCString) + _storage.getString().size());
+ return sizeof(Value) +
+ (_storage.shortStr ? 0 // string stored inline, so no extra mem usage
+ : sizeof(RCString) + _storage.getString().size());
case Object:
return sizeof(Value) + getDocument().getApproximateSize();