diff options
author | David Storch <david.storch@10gen.com> | 2016-06-30 17:30:41 -0400 |
---|---|---|
committer | David Storch <david.storch@10gen.com> | 2016-08-19 09:27:56 -0400 |
commit | 9aef6602683af7842e04c025c47d652b3897c541 (patch) | |
tree | e5c4e70714c4a4e38fc450cdd65628ad58b70107 /src/mongo/bson | |
parent | e404756a317fbd531306805cf77e723b9c3fc218 (diff) | |
download | mongo-9aef6602683af7842e04c025c47d652b3897c541.tar.gz |
SERVER-24508 delete BSONObj::equal()
Instead, use comparator.evaluate(obj1 == obj2), where comparator is of
type BSONObj::ComparatorInterface.
Diffstat (limited to 'src/mongo/bson')
-rw-r--r-- | src/mongo/bson/bsonobj.cpp | 15 | ||||
-rw-r--r-- | src/mongo/bson/bsonobj.h | 2 |
2 files changed, 0 insertions, 17 deletions
diff --git a/src/mongo/bson/bsonobj.cpp b/src/mongo/bson/bsonobj.cpp index 992e2dd0a89..ca2e0991403 100644 --- a/src/mongo/bson/bsonobj.cpp +++ b/src/mongo/bson/bsonobj.cpp @@ -46,21 +46,6 @@ namespace mongo { using namespace std; /* BSONObj ------------------------------------------------------------*/ -// deep (full) equality -bool BSONObj::equal(const BSONObj& rhs) const { - BSONObjIterator i(*this); - BSONObjIterator j(rhs); - BSONElement l, r; - do { - // so far, equal... - l = i.next(); - r = j.next(); - if (l.eoo()) - return r.eoo(); - } while (l == r); - return false; -} - void BSONObj::_assertInvalid() const { StringBuilder ss; int os = objsize(); diff --git a/src/mongo/bson/bsonobj.h b/src/mongo/bson/bsonobj.h index 726a5f43be9..cfd35c2513f 100644 --- a/src/mongo/bson/bsonobj.h +++ b/src/mongo/bson/bsonobj.h @@ -474,8 +474,6 @@ public: return DeferredComparison(DeferredComparison::Type::kNE, *this, other); } - bool equal(const BSONObj& r) const; - /** * Functor compatible with std::hash for std::unordered_{map,set} * Warning: The hash function is subject to change. Do not use in cases where hashes need |