From 85c7782eb8ad01d891c1859764299058eb0a0ab8 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Sun, 7 May 2017 07:51:16 +1000 Subject: tdf#43157: convert salhelper from OSL_ASSERT to assert Change-Id: Ibbb8cf124b79626e89938a79f40f8ee714af8e86 --- salhelper/source/simplereferenceobject.cxx | 3 ++- salhelper/source/timer.cxx | 16 ++++++++-------- 2 files changed, 10 insertions(+), 9 deletions(-) (limited to 'salhelper/source') diff --git a/salhelper/source/simplereferenceobject.cxx b/salhelper/source/simplereferenceobject.cxx index 72e31c429cdc..8e5fdfa18d2c 100644 --- a/salhelper/source/simplereferenceobject.cxx +++ b/salhelper/source/simplereferenceobject.cxx @@ -21,12 +21,13 @@ #include "osl/diagnose.h" #include +#include using salhelper::SimpleReferenceObject; SimpleReferenceObject::~SimpleReferenceObject() { - OSL_ASSERT(m_nCount == 0); + assert(m_nCount == 0); } void * SimpleReferenceObject::operator new(std::size_t nSize) diff --git a/salhelper/source/timer.cxx b/salhelper/source/timer.cxx index c79f1fc03588..4d09ffe9644a 100644 --- a/salhelper/source/timer.cxx +++ b/salhelper/source/timer.cxx @@ -116,7 +116,7 @@ void Timer::start() TimerManager *pManager = TimerManager::getTimerManager(); - OSL_ASSERT(pManager); + assert(pManager); if ( pManager != nullptr ) { @@ -129,7 +129,7 @@ void Timer::stop() { TimerManager *pManager = TimerManager::getTimerManager(); - OSL_ASSERT(pManager); + assert(pManager); if ( pManager != nullptr ) { @@ -141,7 +141,7 @@ sal_Bool Timer::isTicking() const { TimerManager *pManager = TimerManager::getTimerManager(); - OSL_ASSERT(pManager); + assert(pManager); if (pManager) return pManager->lookupTimer(this); @@ -161,7 +161,7 @@ sal_Bool Timer::isExpired() const sal_Bool Timer::expiresBefore(const Timer* pTimer) const { - OSL_ASSERT(pTimer); + assert(pTimer); if ( pTimer != nullptr ) { @@ -245,7 +245,7 @@ TimerManager::TimerManager() { osl::MutexGuard Guard(theTimerManagerMutex::get()); - OSL_ASSERT(m_pManager == nullptr); + assert(m_pManager == nullptr); m_pManager = this; @@ -282,7 +282,7 @@ TimerManager* TimerManager::getTimerManager() void TimerManager::registerTimer(Timer* pTimer) { - OSL_ASSERT(pTimer); + assert(pTimer); if ( pTimer == nullptr ) { @@ -321,7 +321,7 @@ void TimerManager::registerTimer(Timer* pTimer) void TimerManager::unregisterTimer(Timer* pTimer) { - OSL_ASSERT(pTimer); + assert(pTimer); if ( pTimer == nullptr ) { @@ -347,7 +347,7 @@ void TimerManager::unregisterTimer(Timer* pTimer) bool TimerManager::lookupTimer(const Timer* pTimer) { - OSL_ASSERT(pTimer); + assert(pTimer); if ( pTimer == nullptr ) { -- cgit