0
0
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:
Mathias Stearn 2011-01-18 19:43:55 -05:00
parent a072c12c30
commit d4c9571a5a
2 changed files with 4 additions and 3 deletions

View File

@ -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() );

View File

@ -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;