diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-29 09:14:35 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-30 08:30:07 +0200 |
commit | e040d8defb774255e083825863641493f4c7d9ff (patch) | |
tree | 0204123da57116934b569d1523e71b675f9e9860 /sd | |
parent | 9e1df712d6e247f4dc9391c0a006b3da2df40403 (diff) |
don't declare allocation operators for internal code
since they just call into malloc/free now, we can ignore them. Should
have some nice side-effects like letting the compiler allocate
temporaries on the stack.
Change-Id: I2500abe19acf9b5bcc676604393c498d4e0dce58
Reviewed-on: https://gerrit.libreoffice.org/59658
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd')
-rw-r--r-- | sd/inc/helper/simplereferencecomponent.hxx | 23 | ||||
-rw-r--r-- | sd/source/helper/simplereferencecomponent.cxx | 39 |
2 files changed, 0 insertions, 62 deletions
diff --git a/sd/inc/helper/simplereferencecomponent.hxx b/sd/inc/helper/simplereferencecomponent.hxx index 64e894a4deef..bfe1c391535a 100644 --- a/sd/inc/helper/simplereferencecomponent.hxx +++ b/sd/inc/helper/simplereferencecomponent.hxx @@ -51,25 +51,6 @@ public: bool isDisposed() const { return mbDisposed; } - /** see general class documentation - */ - static void * operator new(std::size_t nSize); - - /** see general class documentation - */ - static void * operator new(std::size_t nSize, - std::nothrow_t const & rNothrow) - ; - - /** see general class documentation - */ - static void operator delete(void * pPtr); - - /** see general class documentation - */ - static void operator delete(void * pPtr, std::nothrow_t const & rNothrow) - ; - protected: virtual void disposing(); @@ -82,10 +63,6 @@ private: void operator =(SimpleReferenceComponent) = delete; - static void * operator new[](std::size_t) = delete; - - static void operator delete[](void * pPtr) = delete; - bool mbDisposed; }; diff --git a/sd/source/helper/simplereferencecomponent.cxx b/sd/source/helper/simplereferencecomponent.cxx index 872a6ce4052f..b53e382693cb 100644 --- a/sd/source/helper/simplereferencecomponent.cxx +++ b/sd/source/helper/simplereferencecomponent.cxx @@ -75,43 +75,4 @@ void SimpleReferenceComponent::disposing() { } -void * SimpleReferenceComponent::operator new(std::size_t nSize) -{ - return ::operator new(nSize); -} - -void * SimpleReferenceComponent::operator new(std::size_t nSize, - std::nothrow_t const & -#ifndef _WIN32 - rNothrow -#endif - ) -{ -#if defined(_WIN32) - return ::operator new(nSize); - // WNT lacks a global nothrow operator new... -#else // WNT - return ::operator new(nSize, rNothrow); -#endif // WNT -} - -void SimpleReferenceComponent::operator delete(void * pPtr) -{ - ::operator delete(pPtr); -} - -void SimpleReferenceComponent::operator delete(void * pPtr, - std::nothrow_t const & -#ifndef _WIN32 - rNothrow -#endif -) -{ -#if defined(_WIN32) - ::operator delete(pPtr); // WNT lacks a global nothrow operator delete... -#else // WNT - ::operator delete(pPtr, rNothrow); -#endif // WNT -} - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |