summaryrefslogtreecommitdiff
path: root/src/mongo/bson/mutable/document-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/bson/mutable/document-inl.h')
-rw-r--r--src/mongo/bson/mutable/document-inl.h74
1 files changed, 37 insertions, 37 deletions
diff --git a/src/mongo/bson/mutable/document-inl.h b/src/mongo/bson/mutable/document-inl.h
index d38868ffd8e..3307567536e 100644
--- a/src/mongo/bson/mutable/document-inl.h
+++ b/src/mongo/bson/mutable/document-inl.h
@@ -30,50 +30,50 @@
namespace mongo {
namespace mutablebson {
- inline int Document::compareWith(const Document& other, bool considerFieldName) const {
- // We cheat and use Element::compareWithElement since we know that 'other' is a
- // Document and has a 'hidden' fieldname that is always indentical across all Document
- // instances.
- return root().compareWithElement(other.root(), considerFieldName);
- }
+inline int Document::compareWith(const Document& other, bool considerFieldName) const {
+ // We cheat and use Element::compareWithElement since we know that 'other' is a
+ // Document and has a 'hidden' fieldname that is always indentical across all Document
+ // instances.
+ return root().compareWithElement(other.root(), considerFieldName);
+}
- inline int Document::compareWithBSONObj(const BSONObj& other, bool considerFieldName) const {
- return root().compareWithBSONObj(other, considerFieldName);
- }
+inline int Document::compareWithBSONObj(const BSONObj& other, bool considerFieldName) const {
+ return root().compareWithBSONObj(other, considerFieldName);
+}
- inline void Document::writeTo(BSONObjBuilder* builder) const {
- return root().writeTo(builder);
- }
+inline void Document::writeTo(BSONObjBuilder* builder) const {
+ return root().writeTo(builder);
+}
- inline BSONObj Document::getObject() const {
- BSONObjBuilder builder;
- writeTo(&builder);
- return builder.obj();
- }
+inline BSONObj Document::getObject() const {
+ BSONObjBuilder builder;
+ writeTo(&builder);
+ return builder.obj();
+}
- inline Element Document::root() {
- return _root;
- }
+inline Element Document::root() {
+ return _root;
+}
- inline ConstElement Document::root() const {
- return _root;
- }
+inline ConstElement Document::root() const {
+ return _root;
+}
- inline Element Document::end() {
- return Element(this, Element::kInvalidRepIdx);
- }
+inline Element Document::end() {
+ return Element(this, Element::kInvalidRepIdx);
+}
- inline ConstElement Document::end() const {
- return const_cast<Document*>(this)->end();
- }
+inline ConstElement Document::end() const {
+ return const_cast<Document*>(this)->end();
+}
- inline std::string Document::toString() const {
- return getObject().toString();
- }
+inline std::string Document::toString() const {
+ return getObject().toString();
+}
- inline bool Document::isInPlaceModeEnabled() const {
- return getCurrentInPlaceMode() == kInPlaceEnabled;
- }
+inline bool Document::isInPlaceModeEnabled() const {
+ return getCurrentInPlaceMode() == kInPlaceEnabled;
+}
-} // namespace mutablebson
-} // namespace mongo
+} // namespace mutablebson
+} // namespace mongo