summaryrefslogtreecommitdiff
path: root/src/mongo/s/grid.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2013-06-25 19:42:11 -0400
committerEliot Horowitz <eliot@10gen.com>2013-06-26 22:36:37 -0400
commit692f1859a032a92e54f08b1a2a130fa99590b1d0 (patch)
treecb5704667f7ec4254b3a837e2f2668cfbaacafe5 /src/mongo/s/grid.cpp
parentbd0713e9a67f67b19944841275007f6fc6ee1c69 (diff)
downloadmongo-692f1859a032a92e54f08b1a2a130fa99590b1d0.tar.gz
clean NamespaceString so that it can be the thing passed around
Diffstat (limited to 'src/mongo/s/grid.cpp')
-rw-r--r--src/mongo/s/grid.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/mongo/s/grid.cpp b/src/mongo/s/grid.cpp
index 62ea11f48b2..e3b0e7a6f94 100644
--- a/src/mongo/s/grid.cpp
+++ b/src/mongo/s/grid.cpp
@@ -38,12 +38,8 @@ namespace mongo {
MONGO_FP_DECLARE(neverBalance);
- DBConfigPtr Grid::getDBConfig( string database , bool create , const string& shardNameHint ) {
- {
- string::size_type i = database.find( "." );
- if ( i != string::npos )
- database = database.substr( 0 , i );
- }
+ DBConfigPtr Grid::getDBConfig( const StringData& ns , bool create , const string& shardNameHint ) {
+ string database = nsToDatabase( ns );
if ( database == "config" )
return configServerPtr;