summaryrefslogtreecommitdiff
path: root/src/mongo/bson/mutable/element-inl.h
diff options
context:
space:
mode:
authorAndrew Morrow <acm@10gen.com>2013-08-08 16:43:15 -0400
committerAndrew Morrow <acm@10gen.com>2013-09-12 12:10:26 -0400
commit19e7f781a2b76e523344a3fe1d55987fd5c96395 (patch)
tree2edc6bb0b9c3a510dd5b1b28eb1b9ca78f8c1333 /src/mongo/bson/mutable/element-inl.h
parent0d6d7f72126ab8924d44ea1bfa7d647dd05ddd6c (diff)
downloadmongo-19e7f781a2b76e523344a3fe1d55987fd5c96395.tar.gz
SERVER-10159 Inline Element::OK and Document::end; they are called often
Diffstat (limited to 'src/mongo/bson/mutable/element-inl.h')
-rw-r--r--src/mongo/bson/mutable/element-inl.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mongo/bson/mutable/element-inl.h b/src/mongo/bson/mutable/element-inl.h
index bfd92ecb745..ba47b9cf38d 100644
--- a/src/mongo/bson/mutable/element-inl.h
+++ b/src/mongo/bson/mutable/element-inl.h
@@ -89,6 +89,10 @@ namespace mutablebson {
return isType(mongo::MaxKey);
}
+ inline bool Element::ok() const {
+ return ((_doc != NULL) && (_repIdx <= kMaxRepIdx));
+ }
+
inline Document& Element::getDocument() {
return *_doc;
}