diff options
| author | Eric Schendel <esche@sourceforge.net> | 2002-09-16 17:21:20 +0000 |
|---|---|---|
| committer | Eric Schendel <esche@sourceforge.net> | 2002-09-16 17:21:20 +0000 |
| commit | c826393470c6012e58cac9731d6a2cf96e2ff2b8 (patch) | |
| tree | 47a4b9ba1b336ba834803cceecde7dc2ccd4860d /src/cppunit/TestFactoryRegistry.cpp | |
| parent | bc0b1c3f1abf0cc570216bed96d7cc84cdb08052 (diff) | |
| download | cppunit-c826393470c6012e58cac9731d6a2cf96e2ff2b8.tar.gz | |
Map needs comparator, make_pair to pair, and map dereference fix (SUN4)
Diffstat (limited to 'src/cppunit/TestFactoryRegistry.cpp')
| -rw-r--r-- | src/cppunit/TestFactoryRegistry.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/cppunit/TestFactoryRegistry.cpp b/src/cppunit/TestFactoryRegistry.cpp index 663237a..d0339a9 100644 --- a/src/cppunit/TestFactoryRegistry.cpp +++ b/src/cppunit/TestFactoryRegistry.cpp @@ -11,7 +11,7 @@ CPPUNIT_NS_BEGIN class TestFactoryRegistryList { private: - typedef CppUnitMap<std::string, TestFactoryRegistry *> Registries; + typedef CppUnitMap<std::string, TestFactoryRegistry *, std::less<std::string> > Registries; Registries m_registries; enum State { @@ -41,10 +41,10 @@ private: if ( foundIt == m_registries.end() ) { TestFactoryRegistry *factory = new TestFactoryRegistry( name ); - m_registries.insert( std::make_pair( name, factory ) ); + m_registries.insert( std::pair<const std::string, TestFactoryRegistry*>( name, factory ) ); return factory; } - return foundIt->second; + return (*foundIt).second; } public: @@ -56,7 +56,7 @@ public: ~TestFactoryRegistryList() { for ( Registries::iterator it = m_registries.begin(); it != m_registries.end(); ++it ) - delete it->second; + delete (*it).second; stateFlag( destroyed ); } |
