Skip to content

Commit cfb6799

Browse files
committed
code consistency
1 parent 32f2c83 commit cfb6799

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

tmxlite/src/Property.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Property::Property()
3838
}
3939

4040
//public
41-
void Property::parse(const pugi::xml_node &node)
41+
void Property::parse(const pugi::xml_node& node)
4242
{
4343
std::string attribData = node.name();
4444
if (attribData != "property")
@@ -73,8 +73,10 @@ void Property::parse(const pugi::xml_node &node)
7373
{
7474
m_stringValue = node.attribute("value").as_string();
7575

76-
//If value is empty, try getting the child value instead
77-
if(m_stringValue.length() < 1){
76+
//if value is empty, try getting the child value instead
77+
//as this is how multiline string properties are stored.
78+
if(m_stringValue.empty())
79+
{
7880
m_stringValue = node.child_value();
7981
}
8082

0 commit comments

Comments
 (0)