From a6784270bb5f557de909d9c11688775d6f287d09 Mon Sep 17 00:00:00 2001 From: artemp Date: Tue, 3 Jul 2012 11:16:10 +0100 Subject: [PATCH] + pass args by const ref --- include/mapnik/formatting/registry.hpp | 2 +- src/formatting/registry.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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;