View | Details | Raw Unified | Return to bug 191871 | Differences between
and this patch

Collapse All | Expand All

(-)b/files/patch-src_xml.cpp (-2 / +2 lines)
Lines 12-20 Link Here
12
 
12
 
13
 namespace tqsllib {
13
 namespace tqsllib {
14
 
14
 
15
+shared_ptr<XMLElement> make_shared_XMLElement(XMLElement *e)
15
+shared_ptr<XMLElement> make_shared_XMLElement(XMLElement e)
16
+{
16
+{
17
+	shared_ptr<XMLElement> p(e);
17
+	shared_ptr<XMLElement> p = make_shared<XMLElement>(e);
18
+	return p;
18
+	return p;
19
+}
19
+}
20
+
20
+
(-)b/files/patch-src_xml.h (-2 / +2 lines)
Lines 31-37 Link Here
31
 
31
 
32
+
32
+
33
 class XMLElement;
33
 class XMLElement;
34
+shared_ptr<XMLElement> make_shared_XMLElement(XMLElement *e);
34
+shared_ptr<XMLElement> make_shared_XMLElement(XMLElement e);
35
+class XMLElementP {
35
+class XMLElementP {
36
+	public:
36
+	public:
37
+		XMLElementP() {}
37
+		XMLElementP() {}
Lines 61-67 Link Here
61
-XMLElement::addElement(const XMLElement& element) {
61
-XMLElement::addElement(const XMLElement& element) {
62
-	XMLElementList::iterator it = _elements.insert(make_pair(element.getElementName(), element));
62
-	XMLElementList::iterator it = _elements.insert(make_pair(element.getElementName(), element));
63
+XMLElement::addElement(XMLElement& element) {
63
+XMLElement::addElement(XMLElement& element) {
64
+	XMLElementList::iterator it = _elements.insert(make_pair(element.getElementName(), make_shared_XMLElement(&element)));
64
+	XMLElementList::iterator it = _elements.insert(make_pair(element.getElementName(), make_shared_XMLElement(element)));
65
 	return it;
65
 	return it;
66
 }
66
 }
67
 
67
 

Return to bug 191871