pass optional by const ref

This commit is contained in:
Dane Springmeyer 2013-03-12 16:56:31 -07:00
parent 86ad6c0dab
commit 71a04cd09d

View file

@ -111,7 +111,7 @@ private:
void find_unused_nodes_recursive(xml_node const& node, std::string & error_text); void find_unused_nodes_recursive(xml_node const& node, std::string & error_text);
std::string ensure_relative_to_xml(boost::optional<std::string> opt_path); std::string ensure_relative_to_xml(boost::optional<std::string> const& opt_path);
void ensure_exists(std::string const& file_path); void ensure_exists(std::string const& file_path);
boost::optional<color> get_opt_color_attr(boost::property_tree::ptree const& node, boost::optional<color> get_opt_color_attr(boost::property_tree::ptree const& node,
std::string const& name); std::string const& name);
@ -1634,7 +1634,7 @@ void map_parser::ensure_font_face(std::string const& face_name)
} }
} }
std::string map_parser::ensure_relative_to_xml(boost::optional<std::string> opt_path) std::string map_parser::ensure_relative_to_xml(boost::optional<std::string> const& opt_path)
{ {
if (marker_cache::instance().is_uri(*opt_path)) if (marker_cache::instance().is_uri(*opt_path))
return *opt_path; return *opt_path;