diff options
author | Chris Sherlock <chris.sherlock79@gmail.com> | 2017-06-07 22:50:54 +1000 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2017-06-12 12:33:20 +0200 |
commit | 3c354ea9ed8158143110fda56af22d12e750fc2f (patch) | |
tree | 3a54fa852cf34be71a433130bf7b0eadbfa373bc | |
parent | fd0ca411ee6963d575e16397a7a11549a5ca2ebe (diff) |
tdf#43157 - salhelper: convert from OSL_ASSERT to assert
Change-Id: I8691a627bbf78ce83db595053d6e254557641408
Reviewed-on: https://gerrit.libreoffice.org/38506
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
-rw-r--r-- | include/salhelper/refobj.hxx | 4 | ||||
-rw-r--r-- | salhelper/source/simplereferenceobject.cxx | 10 |
2 files changed, 8 insertions, 6 deletions
diff --git a/include/salhelper/refobj.hxx b/include/salhelper/refobj.hxx index bb2f31bcd78f..1a646d4cb0fb 100644 --- a/include/salhelper/refobj.hxx +++ b/include/salhelper/refobj.hxx @@ -20,6 +20,8 @@ #ifndef INCLUDED_SALHELPER_REFOBJ_HXX #define INCLUDED_SALHELPER_REFOBJ_HXX +#include <cassert> + #include <sal/types.h> #include <rtl/alloc.h> #include <osl/diagnose.h> @@ -85,7 +87,7 @@ protected: */ virtual ~ReferenceObject() { - OSL_ASSERT(m_nReferenceCount == 0); + assert(m_nReferenceCount == 0); } }; diff --git a/salhelper/source/simplereferenceobject.cxx b/salhelper/source/simplereferenceobject.cxx index 72e31c429cdc..fcf130d9d192 100644 --- a/salhelper/source/simplereferenceobject.cxx +++ b/salhelper/source/simplereferenceobject.cxx @@ -17,24 +17,24 @@ * the License at http://www.apache.org/licenses/LICENSE-2.0 . */ -#include "salhelper/simplereferenceobject.hxx" -#include "osl/diagnose.h" +#include <salhelper/simplereferenceobject.hxx> +#include <cassert> #include <new> using salhelper::SimpleReferenceObject; SimpleReferenceObject::~SimpleReferenceObject() { - OSL_ASSERT(m_nCount == 0); + assert(m_nCount == 0); } -void * SimpleReferenceObject::operator new(std::size_t nSize) +void *SimpleReferenceObject::operator new(std::size_t nSize) { return ::operator new(nSize); } -void * SimpleReferenceObject::operator new(std::size_t nSize, +void *SimpleReferenceObject::operator new(std::size_t nSize, std::nothrow_t const &) { #if defined(_WIN32) |