Use XMLNode::set_property API in GUIObject class

This commit is contained in:
Tim Mayberry 2016-08-29 17:54:11 +10:00
parent 0bfdab738b
commit 8d90723e8c
2 changed files with 3 additions and 5 deletions

View file

@ -49,9 +49,7 @@ public:
template<typename T> void set_property (const std::string& id, const std::string& prop_name, const T& val) {
XMLNode* child = get_or_add_node (id);
std::stringstream s;
s << val;
child->add_property (prop_name.c_str(), s.str());
child->set_property (prop_name.c_str(), val);
}
/** Remove node with provided id.