summaryrefslogtreecommitdiff
path: root/configmgr/source/partial.hxx
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2013-05-15 08:24:08 +0000
committerCaolán McNamara <caolanm@redhat.com>2013-05-15 12:48:58 +0100
commit8d9998f53af1806b06cf659f52607b2ac409a113 (patch)
treecf31e56c9080ced40815ff48942b8fa3d988ac74 /configmgr/source/partial.hxx
parente78d3245487e9b140caa15b586374e413eba178a (diff)
Related: #i122208# avoid default assignment of recursive STL containers
support for recursive STL containers is not required by the standard. Boost TR1 containers allow them explicitly though but for some compiler/stl combinations there are constness issues that prevent the default assignment operator to work. Adding a small helper function solves this problem in a clean way. (cherry picked from commit 58d204292c12eb5237106d223251d8855aca3ca2) Conflicts: configmgr/source/partial.hxx Change-Id: I301765e47db12f3b158d4525e896e090f4b81bbb
Diffstat (limited to 'configmgr/source/partial.hxx')
-rw-r--r--configmgr/source/partial.hxx7
1 files changed, 4 insertions, 3 deletions
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;