diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-01 17:45:07 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2010-09-01 17:45:07 +0200 |
commit | 29af56dab3285fded22467b727faa0e97af7ada8 (patch) | |
tree | ed0574fbf277c2e3a2421c52ef8f26fc5ea69a2b /libxsd/xsd | |
parent | f1944f2942f6cdcca539f7da92334556bfc104df (diff) |
Drop DOM association if node is copy-assigned to
Diffstat (limited to 'libxsd/xsd')
-rw-r--r-- | libxsd/xsd/cxx/tree/elements.hxx | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/libxsd/xsd/cxx/tree/elements.hxx b/libxsd/xsd/cxx/tree/elements.hxx index 805b32a..09e86b6 100644 --- a/libxsd/xsd/cxx/tree/elements.hxx +++ b/libxsd/xsd/cxx/tree/elements.hxx @@ -377,7 +377,17 @@ namespace xsd type& operator= (const type& x) { - while (&x == 0) /* unused */; + if (this != &x) + { + // Drop DOM association. + // + if (dom_info_.get ()) + { + std::auto_ptr<dom_info> r (0); + dom_info_ = r; + } + } + return *this; } |