diff options
Diffstat (limited to 'src/mongo/db/update_index_data.cpp')
-rw-r--r-- | src/mongo/db/update_index_data.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/db/update_index_data.cpp b/src/mongo/db/update_index_data.cpp index 45e9f90c90c..3a6dcb56676 100644 --- a/src/mongo/db/update_index_data.cpp +++ b/src/mongo/db/update_index_data.cpp @@ -38,7 +38,7 @@ namespace mongo { UpdateIndexData::UpdateIndexData() : _allPathsIndexed( false ) { } - void UpdateIndexData::addPath( const StringData& path ) { + void UpdateIndexData::addPath( StringData path ) { string s; if ( getCanonicalIndexField( path, &s ) ) { _canonicalPaths.insert( s ); @@ -48,7 +48,7 @@ namespace mongo { } } - void UpdateIndexData::addPathComponent( const StringData& pathComponent ) { + void UpdateIndexData::addPathComponent( StringData pathComponent ) { _pathComponents.insert( pathComponent.toString() ); } @@ -62,7 +62,7 @@ namespace mongo { _allPathsIndexed = false; } - bool UpdateIndexData::mightBeIndexed( const StringData& path ) const { + bool UpdateIndexData::mightBeIndexed( StringData path ) const { if ( _allPathsIndexed ) { return true; } @@ -100,7 +100,7 @@ namespace mongo { return false; } - bool UpdateIndexData::_startsWith( const StringData& a, const StringData& b ) const { + bool UpdateIndexData::_startsWith( StringData a, StringData b ) const { if ( !a.startsWith( b ) ) return false; @@ -112,7 +112,7 @@ namespace mongo { return a[b.size()] == '.'; } - bool getCanonicalIndexField( const StringData& fullName, string* out ) { + bool getCanonicalIndexField( StringData fullName, string* out ) { // check if fieldName contains ".$" or ".###" substrings (#=digit) and skip them // however do not skip the first field even if it meets these criteria |