From 0fdf19714613a82a184f4f6e75fb9a4f9b62f18a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Sun, 19 Jan 2014 10:05:08 +0200 Subject: Use std::unique_ptr instead of std::auto_ptr in C++11 mode --- libxsd/xsd/cxx/tree/type-factory-map.txx | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'libxsd/xsd/cxx/tree/type-factory-map.txx') diff --git a/libxsd/xsd/cxx/tree/type-factory-map.txx b/libxsd/xsd/cxx/tree/type-factory-map.txx index 998fb7b..174147c 100644 --- a/libxsd/xsd/cxx/tree/type-factory-map.txx +++ b/libxsd/xsd/cxx/tree/type-factory-map.txx @@ -273,7 +273,7 @@ namespace xsd } template - std::auto_ptr type_factory_map:: + XSD_AUTO_PTR type_factory_map:: create (const C* name, const C* ns, factory static_type, @@ -307,7 +307,7 @@ namespace xsd } if (f == 0) - return std::auto_ptr (0); // No match. + return XSD_AUTO_PTR (); // No match. // Check for xsi:type // @@ -326,11 +326,10 @@ namespace xsd template template - std::auto_ptr type_factory_map:: + XSD_AUTO_PTR type_factory_map:: traits_adapter (const xercesc::DOMElement& e, flags f, container* c) { - std::auto_ptr r (traits::create (e, f, c)); - return std::auto_ptr (r.release ()); + return XSD_AUTO_PTR (traits::create (e, f, c)); } template @@ -428,10 +427,10 @@ namespace xsd // // template - std::auto_ptr + XSD_AUTO_PTR factory_impl (const xercesc::DOMElement& e, flags f, container* c) { - return std::auto_ptr (new T (e, f, c)); + return XSD_AUTO_PTR (new T (e, f, c)); } // -- cgit v1.1