From: Adam Dickmeiss Date: Sat, 25 Jun 2011 18:52:37 +0000 (+0200) Subject: Factory: modify add_creator method X-Git-Tag: v1.2.9~4 X-Git-Url: http://sru.miketaylor.org.uk/cgi-bin?a=commitdiff_plain;h=e6c81eb90be1f335010b747ef7af0a1358927215;p=metaproxy-moved-to-github.git Factory: modify add_creator method --- diff --git a/src/factory_filter.cpp b/src/factory_filter.cpp index a446ba2..c1cb0b7 100644 --- a/src/factory_filter.cpp +++ b/src/factory_filter.cpp @@ -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; } diff --git a/src/factory_filter.hpp b/src/factory_filter.hpp index 4464c32..0fe162b 100644 --- a/src/factory_filter.hpp +++ b/src/factory_filter.hpp @@ -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);