Factory: modify add_creator method
authorAdam Dickmeiss <adam@indexdata.dk>
Sat, 25 Jun 2011 18:52:37 +0000 (20:52 +0200)
committerAdam Dickmeiss <adam@indexdata.dk>
Sat, 25 Jun 2011 18:52:37 +0000 (20:52 +0200)
src/factory_filter.cpp
src/factory_filter.hpp

index a446ba2..c1cb0b7 100644 (file)
@@ -66,8 +66,8 @@ mp::FactoryFilter::~FactoryFilter()
 
 }
 
-bool mp::FactoryFilter::add_creator(std::string fi,
-                                     CreateFilterCallback cfc)
+bool mp::FactoryFilter::add_creator(const std::string &fi,
+                                    CreateFilterCallback cfc)
 {
     return m_p->m_fcm.insert(Rep::CallbackMap::value_type(fi, cfc)).second;
 }
index 4464c32..0fe162b 100644 (file)
@@ -41,7 +41,7 @@ namespace metaproxy_1 {
         FactoryFilter();
         ~FactoryFilter();
 
-        bool add_creator(std::string fi, CreateFilterCallback cfc);
+        bool add_creator(const std::string &fi, CreateFilterCallback cfc);
         
         bool drop_creator(std::string fi);