diff options
author | Andrew Morrow <acm@10gen.com> | 2013-07-08 18:19:22 -0400 |
---|---|---|
committer | Andrew Morrow <acm@10gen.com> | 2013-07-09 20:02:50 -0400 |
commit | b2d128b328405df243e4835615822f895049d8f2 (patch) | |
tree | 876f450765b616de2c2ca55b8326ed5707568d5f /src/mongo/bson/mutable/document.cpp | |
parent | 11989a1f968d632eb78c8d6347b71ca39ef9ff80 (diff) | |
download | mongo-b2d128b328405df243e4835615822f895049d8f2.tar.gz |
SERVER-8046 A few additional coverage driven unit test updates
Diffstat (limited to 'src/mongo/bson/mutable/document.cpp')
-rw-r--r-- | src/mongo/bson/mutable/document.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/bson/mutable/document.cpp b/src/mongo/bson/mutable/document.cpp index 1df190cc613..f8cee4b8913 100644 --- a/src/mongo/bson/mutable/document.cpp +++ b/src/mongo/bson/mutable/document.cpp @@ -1344,6 +1344,10 @@ namespace mutablebson { return fnamesComp; } + const bool considerChildFieldNames = + (impl.getType(thisRep) != mongo::Array) && + (oimpl.getType(otherRep) != mongo::Array); + // We are dealing with either two objects, or two arrays. We need to consider the child // elements individually. We walk two iterators forward over the children and compare // them. Length mismatches are handled by checking early for reaching the end of the @@ -1351,10 +1355,6 @@ namespace mutablebson { ConstElement thisIter = leftChild(); ConstElement otherIter = other.leftChild(); - const bool considerChildFieldNames = - (impl.getType(thisRep) != mongo::Array) && - (impl.getType(otherRep) != mongo::Array); - while (true) { if (!thisIter.ok()) return !otherIter.ok() ? 0 : -1; |