From 0d4790ae071990d18883c0fb799b938ff53b5c62 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 31 May 2011 08:51:12 +0200 Subject: Require explicit keep_dom flag to maintain association in copies --- libxsd/xsd/cxx/tree/elements.hxx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'libxsd') diff --git a/libxsd/xsd/cxx/tree/elements.hxx b/libxsd/xsd/cxx/tree/elements.hxx index 8705c20..53420aa 100644 --- a/libxsd/xsd/cxx/tree/elements.hxx +++ b/libxsd/xsd/cxx/tree/elements.hxx @@ -968,10 +968,10 @@ namespace xsd }; inline _type:: - _type (const type& x, flags, container* c) + _type (const type& x, flags f, container* c) : container_ (c) { - if (x.dom_info_.get ()) + if (x.dom_info_.get () != 0 && (f & flags::keep_dom)) { std::auto_ptr r (x.dom_info_->clone (*this, c)); dom_info_ = r; -- cgit v1.1