aboutsummaryrefslogtreecommitdiff
path: root/libxsd
diff options
context:
space:
mode:
Diffstat (limited to 'libxsd')
-rw-r--r--libxsd/xsd/cxx/tree/containers.hxx3
-rw-r--r--libxsd/xsd/cxx/tree/elements.hxx13
2 files changed, 12 insertions, 4 deletions
diff --git a/libxsd/xsd/cxx/tree/containers.hxx b/libxsd/xsd/cxx/tree/containers.hxx
index 8ea04d2..ba76eae 100644
--- a/libxsd/xsd/cxx/tree/containers.hxx
+++ b/libxsd/xsd/cxx/tree/containers.hxx
@@ -1338,7 +1338,8 @@ namespace xsd
{
ptr& p (*position.base ());
p->_container (0);
- r.reset (static_cast<T*> (p.release ()));
+ std::auto_ptr<T> tmp (static_cast<T*> (p.release ()));
+ r = tmp;
if (erase)
return iterator (v_.erase (position.base ()));
diff --git a/libxsd/xsd/cxx/tree/elements.hxx b/libxsd/xsd/cxx/tree/elements.hxx
index 598a756..7489872 100644
--- a/libxsd/xsd/cxx/tree/elements.hxx
+++ b/libxsd/xsd/cxx/tree/elements.hxx
@@ -440,7 +440,8 @@ namespace xsd
if (m.get () != 0)
{
m->insert (map_->begin (), map_->end ());
- map_.reset ();
+ std::auto_ptr<map> tmp (0);
+ map_ = tmp;
}
else
m = map_;
@@ -465,7 +466,10 @@ namespace xsd
// Part of our subtree.
//
if (m.get () == 0)
- m.reset (new map);
+ {
+ std::auto_ptr<map> tmp (new map);
+ m = tmp;
+ }
m->insert (*i);
sr->map_->erase (i++);
@@ -631,7 +635,10 @@ namespace xsd
assert (container_ == 0);
if (map_.get () == 0)
- map_.reset (new map);
+ {
+ std::auto_ptr<map> tmp (new map);
+ map_ = tmp;
+ }
if (!map_->insert (
std::pair<const identity*, type*> (&id, t)).second)