summaryrefslogtreecommitdiff
path: root/src/mongo/db/stats
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/stats
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/stats')
-rw-r--r--src/mongo/db/stats/top.cpp4
-rw-r--r--src/mongo/db/stats/top.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/src/mongo/db/stats/top.cpp b/src/mongo/db/stats/top.cpp
index fd3f9addedf..24cd4ef8e65 100644
--- a/src/mongo/db/stats/top.cpp
+++ b/src/mongo/db/stats/top.cpp
@@ -67,7 +67,7 @@ namespace mongo {
}
- void Top::record( const StringData& ns, int op, int lockType, long long micros, bool command ) {
+ void Top::record( StringData ns, int op, int lockType, long long micros, bool command ) {
if ( ns[0] == '?' )
return;
@@ -125,7 +125,7 @@ namespace mongo {
}
- void Top::collectionDropped( const StringData& ns ) {
+ void Top::collectionDropped( StringData ns ) {
SimpleMutex::scoped_lock lk(_lock);
_usage.erase(ns);
_lastDropped = ns.toString();
diff --git a/src/mongo/db/stats/top.h b/src/mongo/db/stats/top.h
index dd0b7df3321..e52c6a735c4 100644
--- a/src/mongo/db/stats/top.h
+++ b/src/mongo/db/stats/top.h
@@ -79,10 +79,10 @@ namespace mongo {
typedef StringMap<CollectionData> UsageMap;
public:
- void record( const StringData& ns, int op, int lockType, long long micros, bool command );
+ void record( StringData ns, int op, int lockType, long long micros, bool command );
void append( BSONObjBuilder& b );
void cloneMap(UsageMap& out) const;
- void collectionDropped( const StringData& ns );
+ void collectionDropped( StringData ns );
public: // static stuff
static Top global;