diff options
-rw-r--r-- | configmgr/source/partial.cxx | 2 | ||||
-rw-r--r-- | configmgr/source/partial.hxx | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/configmgr/source/partial.cxx b/configmgr/source/partial.cxx index d2ffa211f5ba..77e77e3e8f99 100644 --- a/configmgr/source/partial.cxx +++ b/configmgr/source/partial.cxx @@ -97,7 +97,7 @@ Partial::Partial( OUString seg; bool end = parseSegment(*i, &n, &seg); if (end) { - p->children[seg] = Node(); + p->children[seg].clear(); break; } Node::Children::iterator j(p->children.find(seg)); diff --git a/configmgr/source/partial.hxx b/configmgr/source/partial.hxx index ac78e0f192ec..dd64a39b7f67 100644 --- a/configmgr/source/partial.hxx +++ b/configmgr/source/partial.hxx @@ -22,13 +22,13 @@ #include "sal/config.h" -#include <map> +#include <boost/unordered_map.hpp> // using the boost container because it explicitly allows recursive types #include <set> #include "boost/noncopyable.hpp" #include "path.hxx" - +#include "rtl/ustring.hxx" namespace configmgr { @@ -46,9 +46,10 @@ public: private: struct Node { - typedef std::map< OUString, Node > Children; + typedef boost::unordered_map< OUString, Node, OUStringHash > Children; Node(): startInclude(false) {} + void clear() { startInclude=false; children.clear(); } Children children; bool startInclude; |