return const& string from xml_node::get_text()

Conflicts:
	src/load_map.cpp
This commit is contained in:
Dane Springmeyer 2014-05-27 13:35:52 -07:00
parent dc7fc35446
commit c87cf109a6
3 changed files with 3 additions and 3 deletions

View file

@ -118,7 +118,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

@ -673,7 +673,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

@ -334,7 +334,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_.size() == 0)
{