summaryrefslogtreecommitdiff
path: root/src/mongo/db/field_ref.cpp
diff options
context:
space:
mode:
authorTyler Brock <tyler.brock@gmail.com>2015-02-06 14:29:45 -0500
committerTyler Brock <tyler.brock@gmail.com>2015-02-06 16:37:35 -0500
commitaa9980b8c02de71c6918fba4aba9f22dd10eed01 (patch)
tree3ade9078069c7e1317a8b31c2e1fc427977d7abe /src/mongo/db/field_ref.cpp
parent3a7675bb6fa110a10be307db3201bfb348cf41cf (diff)
downloadmongo-aa9980b8c02de71c6918fba4aba9f22dd10eed01.tar.gz
SERVER-16940 Change pass-by-const-ref of StringData to pass-by-value
Diffstat (limited to 'src/mongo/db/field_ref.cpp')
-rw-r--r--src/mongo/db/field_ref.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/field_ref.cpp b/src/mongo/db/field_ref.cpp
index af820cc72f4..9881e42b75a 100644
--- a/src/mongo/db/field_ref.cpp
+++ b/src/mongo/db/field_ref.cpp
@@ -36,11 +36,11 @@ namespace mongo {
FieldRef::FieldRef() : _size(0) {}
- FieldRef::FieldRef(const StringData& path) : _size(0) {
+ FieldRef::FieldRef(StringData path) : _size(0) {
parse(path);
}
- void FieldRef::parse(const StringData& path) {
+ void FieldRef::parse(StringData path) {
if (path.size() == 0) {
return;
}
@@ -87,7 +87,7 @@ namespace mongo {
}
}
- void FieldRef::setPart(size_t i, const StringData& part) {
+ void FieldRef::setPart(size_t i, StringData part) {
dassert(i < _size);
if (_replacements.size() != _size) {
@@ -103,7 +103,7 @@ namespace mongo {
}
}
- size_t FieldRef::appendPart(const StringData& part) {
+ size_t FieldRef::appendPart(StringData part) {
if (_size < kReserveAhead) {
_fixed[_size] = part;
}
@@ -227,7 +227,7 @@ namespace mongo {
return result.substr(startChar, endChar - startChar);
}
- bool FieldRef::equalsDottedField( const StringData& other ) const {
+ bool FieldRef::equalsDottedField( StringData other ) const {
StringData rest = other;
for ( size_t i = 0; i < _size; i++ ) {