diff --git a/editor/xml_feature.cpp b/editor/xml_feature.cpp index dcfb0ca379..0f0b24c8d5 100644 --- a/editor/xml_feature.cpp +++ b/editor/xml_feature.cpp @@ -310,14 +310,14 @@ string XMLFeature::GetTagValue(string const & key) const return tag.attribute("v").value(); } -void XMLFeature::SetTagValue(string const & key, string const value) +void XMLFeature::SetTagValue(string const & key, string const & value) { auto tag = FindTag(m_document, key); if (!tag) { tag = GetRootNode().append_child("tag"); - tag.append_attribute("k") = key.data(); - tag.append_attribute("v") = value.data(); + tag.append_attribute("k").set_value(key.c_str()); + tag.append_attribute("v").set_value(value.c_str()); } else { diff --git a/editor/xml_feature.hpp b/editor/xml_feature.hpp index 45f94af5a4..09043e9f75 100644 --- a/editor/xml_feature.hpp +++ b/editor/xml_feature.hpp @@ -150,7 +150,7 @@ public: } string GetTagValue(string const & key) const; - void SetTagValue(string const & key, string const value); + void SetTagValue(string const & key, string const & value); string GetAttribute(string const & key) const; void SetAttribute(string const & key, string const & value);