diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2015-01-27 10:03:01 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2015-01-27 10:03:01 +0100 |
commit | 0866023fafe4665f488eaea65a32cd1364e21594 (patch) | |
tree | 72ce1044f1b3bafc2fc2e15978985dfbc0126c73 /include/cppuhelper | |
parent | 779581feed4886313746a71e9e738d736977be1b (diff) |
Get rid of std::auto_ptr in stable URE interface
...the deprecation-warning noise is getting ever louder, and eventually auto_ptr
will just disappear. Just surrender and use good-old plain pointer and deletion
in dtor---it's probably the best to do in this stable interface.
The change is backwards compatible. For one, in all relevant standard libraries
(libstdc++, even in debug mode; libc++; msvcrt) sizeof(auto_ptr<T>) equals
sizeof(T*). And for another, the removed UnoUrlDescriptor ctor was only called
from within cppuhelper and had deliberately been left out of
cppuhelper/source/gcc3.map (so isn't exported at least on Linux)---marking it
SAL_DLLPRIVATE had probably just been forgotten when retrofitting cppuhelper
with CPPUHELPER_DLLPUBLIC annotations.
Change-Id: Ic8bce29d93938f2b2e0a264baee85132668e1294
Diffstat (limited to 'include/cppuhelper')
-rw-r--r-- | include/cppuhelper/propshlp.hxx | 3 | ||||
-rw-r--r-- | include/cppuhelper/unourl.hxx | 11 |
2 files changed, 5 insertions, 9 deletions
diff --git a/include/cppuhelper/propshlp.hxx b/include/cppuhelper/propshlp.hxx index 8cf0159ad96a..c65282238a54 100644 --- a/include/cppuhelper/propshlp.hxx +++ b/include/cppuhelper/propshlp.hxx @@ -29,7 +29,6 @@ #include <com/sun/star/beans/XMultiPropertySet.hpp> #include <com/sun/star/beans/XFastPropertySet.hpp> -#include <memory> #include <cppuhelper/cppuhelperdllapi.h> @@ -649,7 +648,7 @@ protected: /** reserved for future use. finally, the future has arrived... */ - const std::auto_ptr<Impl> m_pReserved; + Impl * const m_pReserved; private: OPropertySetHelper( const OPropertySetHelper & ); diff --git a/include/cppuhelper/unourl.hxx b/include/cppuhelper/unourl.hxx index 992870985617..64608b134d17 100644 --- a/include/cppuhelper/unourl.hxx +++ b/include/cppuhelper/unourl.hxx @@ -20,7 +20,8 @@ #ifndef INCLUDED_CPPUHELPER_UNOURL_HXX #define INCLUDED_CPPUHELPER_UNOURL_HXX -#include <memory> +#include <sal/config.h> + #include <cppuhelper/cppuhelperdllapi.h> namespace rtl { class OUString; } @@ -49,10 +50,6 @@ public: */ explicit UnoUrlDescriptor(rtl::OUString const & rDescriptor); - /// @cond INTERNAL - explicit UnoUrlDescriptor(std::auto_ptr< Impl > & rImpl); - /// @endcond - UnoUrlDescriptor(UnoUrlDescriptor const & rOther); ~UnoUrlDescriptor(); @@ -98,7 +95,7 @@ public: rtl::OUString getParameter(rtl::OUString const & rKey) const; private: - std::auto_ptr< Impl > m_xImpl; + Impl * m_pImpl; }; /** Parse UNO URLs into their components. @@ -175,7 +172,7 @@ public: private: class Impl; - std::auto_ptr< Impl > m_xImpl; + Impl * m_pImpl; }; } |