diff options
author | Kevin Pulo <kevin.pulo@mongodb.com> | 2020-03-10 16:00:24 +1100 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-03-12 01:28:51 +0000 |
commit | 339fe2c4fda1d54912f6d175caee4d8c3c801b71 (patch) | |
tree | 93b0a9796288f1a7c1b724ebea71a8cc4498618c /src/mongo/db/write_concern_options.h | |
parent | 78d0d7a9780024aedce330ac8710caee237b0fc2 (diff) | |
download | mongo-339fe2c4fda1d54912f6d175caee4d8c3c801b71.tar.gz |
SERVER-46674 Compare WriteConcernOptions properly (without converting to BSON)
Diffstat (limited to 'src/mongo/db/write_concern_options.h')
-rw-r--r-- | src/mongo/db/write_concern_options.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/write_concern_options.h b/src/mongo/db/write_concern_options.h index 7574f60ec55..7bc696f728d 100644 --- a/src/mongo/db/write_concern_options.h +++ b/src/mongo/db/write_concern_options.h @@ -114,6 +114,12 @@ public: // Warning: does not return the same object passed on the last parse() call. BSONObj toBSON() const; + bool operator==(const WriteConcernOptions& other) const; + + bool operator!=(const WriteConcernOptions& other) const { + return !operator==(other); + } + SyncMode syncMode; // The w parameter for this write concern. The wMode represents the string format and |