From d4c9571a5aff074b641bac19399a5bd7fab76dc4 Mon Sep 17 00:00:00 2001 From: Mathias Stearn Date: Tue, 18 Jan 2011 19:43:55 -0500 Subject: [PATCH] Fix windows build by using consistent map type --- client/connpool.cpp | 4 ++-- client/connpool.h | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/connpool.cpp b/client/connpool.cpp index f2f72249592..1046d428368 100644 --- a/client/connpool.cpp +++ b/client/connpool.cpp @@ -145,7 +145,7 @@ namespace mongo { void DBConnectionPool::flush() { scoped_lock L(_mutex); - for ( map::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::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() ); diff --git a/client/connpool.h b/client/connpool.h index 2811b3a43d7..c50cff69e51 100644 --- a/client/connpool.h +++ b/client/connpool.h @@ -107,7 +107,8 @@ namespace mongo { private: mongo::mutex _mutex; - map _pools; // servername -> pool + typedef map PoolMap; // servername -> pool + PoolMap _pools; list _hooks; string _name;