Fix device properties having a garbage name.

Bug was : xmlKey() wrongly return by value. Returning xmlKey().value()
by reference = returning a local object by reference. value() was
destroyed and referenced memory become garbage.
This commit is contained in:
jief666 2021-05-06 12:35:44 +03:00
parent 243f6d7b36
commit 541182fcd1

View File

@ -61,7 +61,7 @@ class XmlAddKey : public XmlValueClass
// m_key.strncpy(keyValue, keyValueLength);
// }
// XmlKeyClass& key() { return m_key; }
XmlKeyClass xmlKey() const { return m_key; }
const XmlKeyClass& xmlKey() const { return m_key; }
decltype(m_key.value()) key() const { return m_key.value(); }
void setKey(const XmlKeyClass& aKey) {