summaryrefslogtreecommitdiff
path: root/src/mongo/bson/bsonobj.h
diff options
context:
space:
mode:
authorTess Avitabile <tess.avitabile@mongodb.com>2016-08-22 14:49:31 -0400
committerTess Avitabile <tess.avitabile@mongodb.com>2016-09-02 15:10:30 -0400
commitf288ea86db58c6aefe4807ed7ac1815577da2752 (patch)
treedadff64105fe94dfeef57c00a38c1e4ff960ca07 /src/mongo/bson/bsonobj.h
parentaa7411e6e2c4fd18bbff934c57567d89dc3efa0e (diff)
downloadmongo-f288ea86db58c6aefe4807ed7ac1815577da2752.tar.gz
SERVER-25159 Default BSON validation version should depend on admin.system.version
Diffstat (limited to 'src/mongo/bson/bsonobj.h')
-rw-r--r--src/mongo/bson/bsonobj.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/mongo/bson/bsonobj.h b/src/mongo/bson/bsonobj.h
index 77f13fd533b..a39bdfb64a6 100644
--- a/src/mongo/bson/bsonobj.h
+++ b/src/mongo/bson/bsonobj.h
@@ -532,8 +532,11 @@ public:
passed object. */
BSONObj replaceFieldNames(const BSONObj& obj) const;
- /** true unless corrupt */
- bool valid() const;
+ /**
+ * Returns true if this object is valid according to the specified BSON version, and returns
+ * false otherwise.
+ */
+ bool valid(BSONVersion version) const;
enum MatchType {
Equality = 0,