summaryrefslogtreecommitdiff
path: root/src/mongo/bson/util/builder.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/bson/util/builder.h')
-rw-r--r--src/mongo/bson/util/builder.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/mongo/bson/util/builder.h b/src/mongo/bson/util/builder.h
index 3833e6747db..7f9e5056195 100644
--- a/src/mongo/bson/util/builder.h
+++ b/src/mongo/bson/util/builder.h
@@ -213,7 +213,7 @@ namespace mongo {
appendBuf(&s, sizeof(T));
}
- void appendStr(const StringData &str , bool includeEndingNull = true ) {
+ void appendStr(StringData str , bool includeEndingNull = true ) {
const int len = str.size() + ( includeEndingNull ? 1 : 0 );
str.copyTo( grow(len), includeEndingNull );
}
@@ -343,7 +343,7 @@ namespace mongo {
StringBuilderImpl& operator<<(const char* str) {
return *this << StringData(str);
}
- StringBuilderImpl& operator<<(const StringData& str) {
+ StringBuilderImpl& operator<<(StringData str) {
append(str);
return *this;
}
@@ -363,7 +363,7 @@ namespace mongo {
void write( const char* buf, int len) { memcpy( _buf.grow( len ) , buf , len ); }
- void append( const StringData& str ) { str.copyTo( _buf.grow( str.size() ), false ); }
+ void append( StringData str ) { str.copyTo( _buf.grow( str.size() ), false ); }
void reset( int maxSize = 0 ) { _buf.reset( maxSize ); }