summaryrefslogtreecommitdiff
path: root/src/mongo/db/pipeline/field_path.h
diff options
context:
space:
mode:
authorMathias Stearn <mathias@10gen.com>2012-11-20 16:58:06 -0500
committerMathias Stearn <mathias@10gen.com>2012-11-26 14:38:13 -0500
commitedb9482cb410e5b78830ad4e340e15479cb00526 (patch)
tree13c0c55ea81d77b616bf96153c01de628f6fab09 /src/mongo/db/pipeline/field_path.h
parent00e5a9aada74de383d6d4f530c30af82e164e1d7 (diff)
downloadmongo-edb9482cb410e5b78830ad4e340e15479cb00526.tar.gz
Optimize ExpressionFieldPath
Diffstat (limited to 'src/mongo/db/pipeline/field_path.h')
-rwxr-xr-xsrc/mongo/db/pipeline/field_path.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/mongo/db/pipeline/field_path.h b/src/mongo/db/pipeline/field_path.h
index c3b9aa2a22c..4ff97817fbe 100755
--- a/src/mongo/db/pipeline/field_path.h
+++ b/src/mongo/db/pipeline/field_path.h
@@ -46,7 +46,7 @@ namespace mongo {
@param i the zero based index of the path element.
@returns the path element
*/
- string getFieldName(size_t i) const;
+ const string& getFieldName(size_t i) const;
/**
Get the full path.
@@ -102,7 +102,7 @@ namespace mongo {
return vFieldName.size();
}
- inline string FieldPath::getFieldName(size_t i) const {
+ inline const string& FieldPath::getFieldName(size_t i) const {
verify(i < getPathLength());
return vFieldName[i];
}