diff options
-rw-r--r-- | src/mongo/db/namespace_string.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mongo/db/namespace_string.h b/src/mongo/db/namespace_string.h index 3c746ad0ddf..5bd7c58c9ef 100644 --- a/src/mongo/db/namespace_string.h +++ b/src/mongo/db/namespace_string.h @@ -317,7 +317,7 @@ public: */ NamespaceString(DatabaseName dbName, StringData collectionName) : _dbName(std::move(dbName)), _ns(str::stream() << _dbName.db() << '.' << collectionName) { - auto db = _dbName.db(); + const auto& db = _dbName.db(); uassert(ErrorCodes::InvalidNamespace, "'.' is an invalid character in the database name: " + db, |