return const& string from xml_node::get_text()

This commit is contained in:
Dane Springmeyer 2014-05-27 13:35:52 -07:00
parent fcfbc70abf
commit 48c027857c
3 changed files with 3 additions and 3 deletions

View file

@ -119,7 +119,7 @@ public:
template <typename T>
T get_attr(std::string const& name) const;
std::string get_text() const;
std::string const& get_text() const;
xml_tree const& get_tree() const
{

View file

@ -648,7 +648,7 @@ void map_parser::parse_layer(Map & map, xml_node const& node)
if (child.is("StyleName"))
{
std::string style_name = child.get_text();
std::string const& style_name = child.get_text();
if (style_name.empty())
{
std::string ss("StyleName is empty in Layer: '");

View file

@ -336,7 +336,7 @@ T xml_node::get_attr(std::string const& name) const
throw attribute_not_found(name_, name);
}
std::string xml_node::get_text() const
std::string const& xml_node::get_text() const
{
if (children_.empty())
{