summaryrefslogtreecommitdiff
path: root/src/cppunit/TestFactoryRegistry.cpp
diff options
context:
space:
mode:
authorEric Schendel <esche@sourceforge.net>2002-09-16 17:21:20 +0000
committerEric Schendel <esche@sourceforge.net>2002-09-16 17:21:20 +0000
commitc826393470c6012e58cac9731d6a2cf96e2ff2b8 (patch)
tree47a4b9ba1b336ba834803cceecde7dc2ccd4860d /src/cppunit/TestFactoryRegistry.cpp
parentbc0b1c3f1abf0cc570216bed96d7cc84cdb08052 (diff)
downloadcppunit-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.cpp8
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 );
}