Use std::list for storing elements in document instead of std::set

This commit is contained in:
fbraem
2015-05-14 18:34:57 +02:00
parent 724ea08f6c
commit 4da82a4102
3 changed files with 4 additions and 14 deletions

View File

@@ -185,7 +185,7 @@ protected:
inline Document& Document::addElement(Element::Ptr element)
{
_elements.insert(element);
_elements.push_back(element);
return *this;
}

View File

@@ -33,7 +33,7 @@
#include <string>
#include <sstream>
#include <iomanip>
#include <set>
#include <list>
namespace Poco {
@@ -76,17 +76,7 @@ inline std::string Element::name() const
}
class ElementComparator
{
public:
bool operator()(const Element::Ptr& s1, const Element::Ptr& s2)
{
return s1->name() < s2->name();
}
};
typedef std::set<Element::Ptr, ElementComparator> ElementSet;
typedef std::list<Element::Ptr> ElementSet;
template<typename T>

View File

@@ -120,7 +120,7 @@ void Document::read(BinaryReader& reader)
}
element->read(reader);
_elements.insert(element);
_elements.push_back(element);
reader >> type;
}