From 91eda816992d033cd6b774d3324cd62346f22835 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Mon, 10 Mar 2014 13:00:14 -0700 Subject: [PATCH] pass string by const& --- include/mapnik/xml_tree.hpp | 2 +- src/xml_tree.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/mapnik/xml_tree.hpp b/include/mapnik/xml_tree.hpp index 25bd00d24..61414d759 100644 --- a/include/mapnik/xml_tree.hpp +++ b/include/mapnik/xml_tree.hpp @@ -43,7 +43,7 @@ class xml_tree { public: xml_tree(std::string const& encoding="utf8"); - void set_filename(std::string fn); + void set_filename(std::string const& fn); std::string const& filename() const; xml_node &root(); xml_node const& root() const; diff --git a/src/xml_tree.cpp b/src/xml_tree.cpp index af04dcc9d..4e590b77b 100644 --- a/src/xml_tree.cpp +++ b/src/xml_tree.cpp @@ -106,7 +106,7 @@ xml_tree::xml_tree(std::string const& encoding) node_.set_processed(true); //root node is always processed } -void xml_tree::set_filename(std::string fn) +void xml_tree::set_filename(std::string const& fn) { file_ = fn; }