summaryrefslogtreecommitdiff
path: root/src/mongo/db/projection.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2012-11-15 13:59:20 -0500
committerMathias Stearn <mathias@10gen.com>2012-11-15 13:59:38 -0500
commitfa283ee1d6a4900497753e807a678905d029c540 (patch)
tree6d9808caa7078ed464dc0ad69c039b082e4e181f /src/mongo/db/projection.h
parentf3121bdcd1e330e49092287faa6b70898c973eca (diff)
downloadmongo-fa283ee1d6a4900497753e807a678905d029c540.tar.gz
Make Projection use StringMap
Diffstat (limited to 'src/mongo/db/projection.h')
-rw-r--r--src/mongo/db/projection.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/mongo/db/projection.h b/src/mongo/db/projection.h
index c4844f7a146..418c6fe5ca8 100644
--- a/src/mongo/db/projection.h
+++ b/src/mongo/db/projection.h
@@ -18,6 +18,7 @@
#pragma once
#include "mongo/pch.h"
+#include "mongo/util/string_map.h"
#include "jsobj.h"
namespace mongo {
@@ -140,7 +141,7 @@ namespace mongo {
bool _special; // true if this level can't be skipped or included without recursing
//TODO: benchmark vector<pair> vs map
- typedef map<string, boost::shared_ptr<Projection> > FieldMap;
+ typedef StringMap<boost::shared_ptr<Projection> > FieldMap;
FieldMap _fields;
BSONObj _source;
bool _includeID;
@@ -150,7 +151,7 @@ namespace mongo {
int _limit;
// used for $elemMatch and positional operator ($)
- typedef map<string, shared_ptr<Matcher> > Matchers;
+ typedef StringMap<boost::shared_ptr<Matcher> > Matchers;
Matchers _matchers;
ArrayOpType _arrayOpType;