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/parser/non-validating/xml-schema-pimpl.hxx | 6 ++++-- libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.txx | 8 ++++---- libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.hxx | 8 +++++--- 3 files changed, 13 insertions(+), 9 deletions(-) (limited to 'libxsd/xsd/cxx/parser/non-validating') diff --git a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx b/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx index 26c77a6..0e05e42 100644 --- a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx +++ b/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.hxx @@ -8,6 +8,8 @@ #include +#include // XSD_AUTO_PTR + #include namespace xsd @@ -564,7 +566,7 @@ namespace xsd virtual void _characters (const ro_string&); - virtual std::auto_ptr + virtual XSD_AUTO_PTR post_base64_binary (); protected: @@ -582,7 +584,7 @@ namespace xsd virtual void _characters (const ro_string&); - virtual std::auto_ptr + virtual XSD_AUTO_PTR post_hex_binary (); protected: diff --git a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.txx b/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.txx index 2c46874..77b1423 100644 --- a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.txx +++ b/libxsd/xsd/cxx/parser/non-validating/xml-schema-pimpl.txx @@ -1157,7 +1157,7 @@ namespace xsd } template - std::auto_ptr base64_binary_pimpl:: + XSD_AUTO_PTR base64_binary_pimpl:: post_base64_binary () { typedef typename std::basic_string::size_type size_type; @@ -1199,7 +1199,7 @@ namespace xsd size_type quad_count (size / 4); size_type capacity (quad_count * 3 + 1); - std::auto_ptr buf (new buffer (capacity, capacity)); + XSD_AUTO_PTR buf (new buffer (capacity, capacity)); char* dst (buf->data ()); size_type si (0), di (0); // Source and destination indexes. @@ -1309,7 +1309,7 @@ namespace xsd } template - std::auto_ptr hex_binary_pimpl:: + XSD_AUTO_PTR hex_binary_pimpl:: post_hex_binary () { typedef typename ro_string::size_type size_type; @@ -1318,7 +1318,7 @@ namespace xsd size_type size (trim_right (tmp)); buffer::size_t n (size / 2); - std::auto_ptr buf (new buffer (n)); + XSD_AUTO_PTR buf (new buffer (n)); const C* src (tmp.data ()); char* dst (buf->data ()); diff --git a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.hxx b/libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.hxx index 7d0dd00..aae157e 100644 --- a/libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.hxx +++ b/libxsd/xsd/cxx/parser/non-validating/xml-schema-pskel.hxx @@ -7,7 +7,9 @@ #define XSD_CXX_PARSER_NON_VALIDATING_XML_SCHEMA_PSKEL_HXX #include -#include // auto_ptr +#include // std::auto_ptr/unique_ptr + +#include // XSD_AUTO_PTR #include #include @@ -494,7 +496,7 @@ namespace xsd template struct base64_binary_pskel: simple_content { - virtual std::auto_ptr + virtual XSD_AUTO_PTR post_base64_binary () = 0; static const C* @@ -507,7 +509,7 @@ namespace xsd template struct hex_binary_pskel: simple_content { - virtual std::auto_ptr + virtual XSD_AUTO_PTR post_hex_binary () = 0; static const C* -- cgit v1.1