summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/document_source.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/pipeline/document_source.cpp')
-rw-r--r--src/mongo/db/pipeline/document_source.cpp56
1 files changed, 27 insertions, 29 deletions
diff --git a/src/mongo/db/pipeline/document_source.cpp b/src/mongo/db/pipeline/document_source.cpp
index baa3e486784..57d12a7c85c 100644
--- a/src/mongo/db/pipeline/document_source.cpp
+++ b/src/mongo/db/pipeline/document_source.cpp
@@ -34,42 +34,40 @@
namespace mongo {
- using boost::intrusive_ptr;
- using std::vector;
+using boost::intrusive_ptr;
+using std::vector;
- DocumentSource::DocumentSource(const intrusive_ptr<ExpressionContext> &pCtx)
- : pSource(NULL)
- , pExpCtx(pCtx)
- {}
+DocumentSource::DocumentSource(const intrusive_ptr<ExpressionContext>& pCtx)
+ : pSource(NULL), pExpCtx(pCtx) {}
- const char *DocumentSource::getSourceName() const {
- static const char unknown[] = "[UNKNOWN]";
- return unknown;
- }
+const char* DocumentSource::getSourceName() const {
+ static const char unknown[] = "[UNKNOWN]";
+ return unknown;
+}
- void DocumentSource::setSource(DocumentSource *pTheSource) {
- verify(!pSource);
- pSource = pTheSource;
- }
+void DocumentSource::setSource(DocumentSource* pTheSource) {
+ verify(!pSource);
+ pSource = pTheSource;
+}
- bool DocumentSource::coalesce(const intrusive_ptr<DocumentSource> &pNextSource) {
- return false;
- }
+bool DocumentSource::coalesce(const intrusive_ptr<DocumentSource>& pNextSource) {
+ return false;
+}
- intrusive_ptr<DocumentSource> DocumentSource::optimize() {
- return this;
- }
+intrusive_ptr<DocumentSource> DocumentSource::optimize() {
+ return this;
+}
- void DocumentSource::dispose() {
- if ( pSource ) {
- pSource->dispose();
- }
+void DocumentSource::dispose() {
+ if (pSource) {
+ pSource->dispose();
}
+}
- void DocumentSource::serializeToArray(vector<Value>& array, bool explain) const {
- Value entry = serialize(explain);
- if (!entry.missing()) {
- array.push_back(entry);
- }
+void DocumentSource::serializeToArray(vector<Value>& array, bool explain) const {
+ Value entry = serialize(explain);
+ if (!entry.missing()) {
+ array.push_back(entry);
}
}
+}