Kaydet (Commit) 03d960ac authored tarafından Stephan Bergmann's avatar Stephan Bergmann

Avoid using incomplete types with std containers

...which is explicitly supported by Boost.Container though, but we cannot use
boost::container::map here as Boost.Container is only available since Boost 1.48
and our base is 1.47 still.  However, there appears no need for Children to be
sorted, and std::unordered_map (and thus boost::unordered_map) requires that
pointers to elements are not invalidated by insertions, which we do require.

Change-Id: I70ad6f40318d2bafae53ebb67d84c1c89a7d68f6
üst cbcc6189
...@@ -22,8 +22,7 @@ ...@@ -22,8 +22,7 @@
#include "sal/config.h" #include "sal/config.h"
#include <map> #include "boost/unordered_map.hpp"
#include "boost/noncopyable.hpp" #include "boost/noncopyable.hpp"
#include "path.hxx" #include "path.hxx"
...@@ -34,7 +33,7 @@ namespace configmgr { ...@@ -34,7 +33,7 @@ namespace configmgr {
class Modifications: private boost::noncopyable { class Modifications: private boost::noncopyable {
public: public:
struct Node { struct Node {
typedef std::map< OUString, Node > Children; typedef boost::unordered_map<OUString, Node, OUStringHash> Children;
Children children; Children children;
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment