From 19e7f781a2b76e523344a3fe1d55987fd5c96395 Mon Sep 17 00:00:00 2001 From: Andrew Morrow Date: Thu, 8 Aug 2013 16:43:15 -0400 Subject: SERVER-10159 Inline Element::OK and Document::end; they are called often --- src/mongo/bson/mutable/element-inl.h | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/mongo/bson/mutable/element-inl.h') 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; } -- cgit v1.2.1