diff options
-rw-r--r-- | include/salhelper/simplereferenceobject.hxx | 22 | ||||
-rw-r--r-- | salhelper/source/simplereferenceobject.cxx | 15 |
2 files changed, 6 insertions, 31 deletions
diff --git a/include/salhelper/simplereferenceobject.hxx b/include/salhelper/simplereferenceobject.hxx index d8f86f52d00a..2745f0d848fd 100644 --- a/include/salhelper/simplereferenceobject.hxx +++ b/include/salhelper/simplereferenceobject.hxx @@ -51,8 +51,8 @@ namespace salhelper { The same problem as with operators new and delete would also be there with operators new[] and delete[]. But since arrays of reference-counted - objects are of no use, anyway, it seems best to simply declare and not - define (private) operators new[] and delete[]. + objects are of no use, anyway, it seems best to simply + define operators new[] and delete[] as deleted. */ class SALHELPER_DLLPUBLIC SimpleReferenceObject { @@ -102,23 +102,13 @@ private: */ void operator =(SimpleReferenceObject) SAL_DELETED_FUNCTION; - /// @cond INTERNAL - -#ifdef _MSC_VER -/* We can't now have these private with MSVC2008 at least, it leads to - compilation errors in xmloff and other places. -*/ -protected: -#endif - /** not implemented (see general class documentation) + /** see general class documentation */ - static void * operator new[](std::size_t); + static void * operator new[](std::size_t) SAL_DELETED_FUNCTION; - /** not implemented (see general class documentation) + /** see general class documentation */ - static void operator delete[](void * pPtr); - - /// @endcond + static void operator delete[](void * pPtr) SAL_DELETED_FUNCTION; }; } diff --git a/salhelper/source/simplereferenceobject.cxx b/salhelper/source/simplereferenceobject.cxx index fcf130d9d192..c07c922528a6 100644 --- a/salhelper/source/simplereferenceobject.cxx +++ b/salhelper/source/simplereferenceobject.cxx @@ -59,19 +59,4 @@ void SimpleReferenceObject::operator delete(void * pPtr, std::nothrow_t const &) #endif // WNT } -#ifdef _MSC_VER - -/* This operator is supposed to be unimplemented, but that now leads - * to compilation and/or linking errors with MSVC2008. Problem still - * there with MSVC2013. As it can be left unimplemented just fine with - * other compilers, presumably it is never called. So do implement it - * then to avoid the compilation and/or linking errors, but make it - * crash intentionally if called. - */ -void SimpleReferenceObject::operator delete[](void * /* pPtr */) -{ - abort(); -} -#endif - /* vim:set shiftwidth=4 softtabstop=4 expandtab: */ |