summaryrefslogtreecommitdiff
path: root/src/mongo/scripting/mozjs/valuewriter.cpp
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-02-18 11:54:42 -0500
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-02-18 11:58:32 -0500
commit808fc26a78c1c0132019768a24c1060f56e4b7f2 (patch)
tree6250164f04d2534b6f87bdde4a952d5c3450dd75 /src/mongo/scripting/mozjs/valuewriter.cpp
parent3e17e22b60cdca796bb04ffd5ef82cbf7af34d26 (diff)
downloadmongo-808fc26a78c1c0132019768a24c1060f56e4b7f2.tar.gz
SERVER-9131 Fix lint failed checks
Diffstat (limited to 'src/mongo/scripting/mozjs/valuewriter.cpp')
-rw-r--r--src/mongo/scripting/mozjs/valuewriter.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/mongo/scripting/mozjs/valuewriter.cpp b/src/mongo/scripting/mozjs/valuewriter.cpp
index 967a2947cd8..8767c7e83ac 100644
--- a/src/mongo/scripting/mozjs/valuewriter.cpp
+++ b/src/mongo/scripting/mozjs/valuewriter.cpp
@@ -267,17 +267,16 @@ void ValueWriter::_writeObject(BSONObjBuilder* b,
}
if (scope->getProto<CodeInfo>().getJSClass() == jsclass) {
- if (o.hasOwnField(InternedString::scope) // CodeWScope
- && o.type(InternedString::scope) == mongo::Object) {
-
+ if (o.hasOwnField(InternedString::scope) // CodeWScope
+ &&
+ o.type(InternedString::scope) == mongo::Object) {
if (o.type(InternedString::code) != mongo::String) {
uasserted(ErrorCodes::BadValue, "code must be a string");
}
- b->appendCodeWScope(sd, o.getString(InternedString::code),
- o.getObject(InternedString::scope));
- }
- else { // Code
+ b->appendCodeWScope(
+ sd, o.getString(InternedString::code), o.getObject(InternedString::scope));
+ } else { // Code
if (o.type(InternedString::code) != mongo::String) {
uasserted(ErrorCodes::BadValue, "code must be a string");
}