mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-29 16:47:28 +01:00
Fix windows build by using consistent map type
This commit is contained in:
parent
a072c12c30
commit
d4c9571a5a
@ -145,7 +145,7 @@ namespace mongo {
|
||||
|
||||
void DBConnectionPool::flush() {
|
||||
scoped_lock L(_mutex);
|
||||
for ( map<string,PoolForHost>::iterator i = _pools.begin(); i != _pools.end(); i++ ) {
|
||||
for ( PoolMap::iterator i = _pools.begin(); i != _pools.end(); i++ ) {
|
||||
PoolForHost& p = i->second;
|
||||
p.flush();
|
||||
}
|
||||
@ -183,7 +183,7 @@ namespace mongo {
|
||||
|
||||
{
|
||||
scoped_lock lk( _mutex );
|
||||
for ( map<string,PoolForHost>::iterator i=_pools.begin(); i!=_pools.end(); ++i ) {
|
||||
for ( PoolMap::iterator i=_pools.begin(); i!=_pools.end(); ++i ) {
|
||||
string s = i->first;
|
||||
BSONObjBuilder temp( bb.subobjStart( s ) );
|
||||
temp.append( "available" , i->second.numAvailable() );
|
||||
|
@ -107,7 +107,8 @@ namespace mongo {
|
||||
private:
|
||||
|
||||
mongo::mutex _mutex;
|
||||
map<string,PoolForHost,serverNameCompare> _pools; // servername -> pool
|
||||
typedef map<string,PoolForHost,serverNameCompare> PoolMap; // servername -> pool
|
||||
PoolMap _pools;
|
||||
list<DBConnectionHook*> _hooks;
|
||||
string _name;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user