diff --git a/include/mapnik/formatting/registry.hpp b/include/mapnik/formatting/registry.hpp index 1c44e68dd..ef0f2c978 100644 --- a/include/mapnik/formatting/registry.hpp +++ b/include/mapnik/formatting/registry.hpp @@ -46,7 +46,7 @@ class registry : public singleton, public: registry(); ~registry() {} - void register_name(std::string name, from_xml_function_ptr ptr, bool overwrite=false); + void register_name(std::string const& name, from_xml_function_ptr ptr, bool overwrite=false); node_ptr from_xml(xml_node const& xml); private: std::map map_; diff --git a/src/formatting/registry.cpp b/src/formatting/registry.cpp index 527c81d71..0e2b8c81b 100644 --- a/src/formatting/registry.cpp +++ b/src/formatting/registry.cpp @@ -39,7 +39,7 @@ registry::registry() register_name("ExpressionFormat", &expression_format::from_xml); } -void registry::register_name(std::string name, from_xml_function_ptr ptr, bool overwrite) +void registry::register_name(std::string const& name, from_xml_function_ptr ptr, bool overwrite) { if (overwrite) { map_[name] = ptr;