summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 08:54:57 +1000
committerChris Sherlock <chris.sherlock79@gmail.com>2017-05-07 08:55:03 +1000
commit367fa84af9783be40cc05adb154612e38c237172 (patch)
tree2ad6337a713f8ef7a948066fac378d36e4c7896d
parenttdf#43157: convert unotools from OSL_ASSERT to assert (diff)
downloadcore-367fa84af9783be40cc05adb154612e38c237172.tar.gz
core-367fa84af9783be40cc05adb154612e38c237172.zip
tdf#43157: convert ucb and svl from OSL_ASSERT to assert
Change-Id: I34579b2ec0b9a2a98361108bc259ddb1fc1df7b5
-rw-r--r--svl/source/config/itemholder2.cxx2
-rw-r--r--svl/source/misc/strmadpt.cxx2
-rw-r--r--svl/source/misc/urihelper.cxx6
-rw-r--r--ucb/source/core/ucb.cxx2
-rw-r--r--ucb/source/regexp/regexp.cxx6
-rw-r--r--ucb/source/ucp/file/filtask.cxx6
-rw-r--r--ucb/source/ucp/tdoc/tdoc_storage.cxx2
-rw-r--r--ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx2
-rw-r--r--ucb/source/ucp/webdav-neon/NeonSession.cxx2
9 files changed, 15 insertions, 15 deletions
diff --git a/svl/source/config/itemholder2.cxx b/svl/source/config/itemholder2.cxx
index fc12e7681ce4..ceb518c4a012 100644
--- a/svl/source/config/itemholder2.cxx
+++ b/svl/source/config/itemholder2.cxx
@@ -127,7 +127,7 @@ void ItemHolder2::impl_newItem(TItemInfo& rItem)
break;
default:
- OSL_ASSERT(false);
+ assert(false);
break;
}
}
diff --git a/svl/source/misc/strmadpt.cxx b/svl/source/misc/strmadpt.cxx
index 1e36c637a388..0fc546948f2b 100644
--- a/svl/source/misc/strmadpt.cxx
+++ b/svl/source/misc/strmadpt.cxx
@@ -257,7 +257,7 @@ sal_uInt64 SvInputStream::SeekPos(sal_uInt64 const nPos)
try
{
sal_Int64 nLength = m_xSeekable->getLength();
- OSL_ASSERT(nLength >= 0);
+ assert(nLength >= 0);
if (static_cast<sal_uInt64>(nLength)
< STREAM_SEEK_TO_END)
{
diff --git a/svl/source/misc/urihelper.cxx b/svl/source/misc/urihelper.cxx
index 6da98476fa06..b78c66f954d2 100644
--- a/svl/source/misc/urihelper.cxx
+++ b/svl/source/misc/urihelper.cxx
@@ -136,7 +136,7 @@ enum Result { Success, GeneralFailure, SpecificFailure };
Result normalizePrefix( css::uno::Reference< css::ucb::XUniversalContentBroker > const & broker,
OUString const & uri, OUString * normalized)
{
- OSL_ASSERT(broker.is() && normalized != nullptr);
+ assert(broker.is() && normalized != nullptr);
css::uno::Reference< css::ucb::XContent > content;
try {
content = broker->queryContent(broker->createContentIdentifier(uri));
@@ -153,7 +153,7 @@ Result normalizePrefix( css::uno::Reference< css::ucb::XUniversalContentBroker >
0,
css::uno::Reference< css::ucb::XCommandEnvironment >())
>>= *normalized);
- OSL_ASSERT(ok);
+ assert(ok);
} catch (css::uno::RuntimeException &) {
throw;
} catch (css::ucb::UnsupportedCommandException &) {
@@ -255,7 +255,7 @@ URIHelper::normalizedMakeRelative(
css::uno::Reference< css::uno::XComponentContext > const & context,
OUString const & baseUriReference, OUString const & uriReference)
{
- OSL_ASSERT(context.is());
+ assert(context.is());
css::uno::Reference< css::ucb::XUniversalContentBroker > broker(
css::ucb::UniversalContentBroker::create(context));
css::uno::Reference< css::uri::XUriReferenceFactory > uriFactory(
diff --git a/ucb/source/core/ucb.cxx b/ucb/source/core/ucb.cxx
index ed617c47f077..0941b074d91e 100644
--- a/ucb/source/core/ucb.cxx
+++ b/ucb/source/core/ucb.cxx
@@ -719,7 +719,7 @@ void SAL_CALL UniversalContentBroker::changesOccurred( const util::ChangesEvent&
uno::Reference< container::XHierarchicalNameAccess > xHierNameAccess;
Event.Base >>= xHierNameAccess;
- OSL_ASSERT( xHierNameAccess.is() );
+ assert( xHierNameAccess.is() );
const util::ElementChange* pElementChanges
= Event.Changes.getConstArray();
diff --git a/ucb/source/regexp/regexp.cxx b/ucb/source/regexp/regexp.cxx
index 94ca028af92a..a315fbde4631 100644
--- a/ucb/source/regexp/regexp.cxx
+++ b/ucb/source/regexp/regexp.cxx
@@ -45,9 +45,9 @@ inline Regexp::Regexp(Kind eTheKind, OUString const & rThePrefix,
m_bEmptyDomain(bTheEmptyDomain),
m_bTranslation(bTheTranslation)
{
- OSL_ASSERT(m_eKind == KIND_DOMAIN
+ assert(m_eKind == KIND_DOMAIN
|| (!m_bEmptyDomain && m_aInfix.isEmpty()));
- OSL_ASSERT(m_bTranslation || m_aReversePrefix.isEmpty());
+ assert(m_bTranslation || m_aReversePrefix.isEmpty());
}
@@ -153,7 +153,7 @@ bool isScheme(OUString const & rString, bool bColon)
void appendStringLiteral(OUStringBuffer * pBuffer,
OUString const & rString)
{
- OSL_ASSERT(pBuffer);
+ assert(pBuffer);
pBuffer->append('"');
sal_Unicode const * p = rString.getStr();
diff --git a/ucb/source/ucp/file/filtask.cxx b/ucb/source/ucp/file/filtask.cxx
index e78bb9ed46eb..20092bc7fb71 100644
--- a/ucb/source/ucp/file/filtask.cxx
+++ b/ucb/source/ucp/file/filtask.cxx
@@ -1377,7 +1377,7 @@ bool getType(
TaskManager & task, sal_Int32 id, OUString const & fileUrl,
osl::DirectoryItem * item, osl::FileStatus::Type * type)
{
- OSL_ASSERT(item != nullptr && type != nullptr);
+ assert(item != nullptr && type != nullptr);
osl::FileBase::RC err = osl::DirectoryItem::get(fileUrl, *item);
if (err != osl::FileBase::E_None) {
task.installError(id, TASKHANDLING_TRANSFER_BY_COPY_SOURCE, err);
@@ -2935,7 +2935,7 @@ TaskManager::erasePersistentSet( const OUString& aUnqPath,
{
if( ! m_xFileRegistry.is() )
{
- OSL_ASSERT( m_xFileRegistry.is() );
+ assert( m_xFileRegistry.is() );
return;
}
@@ -2996,7 +2996,7 @@ TaskManager::copyPersistentSet( const OUString& srcUnqPath,
{
if( ! m_xFileRegistry.is() )
{
- OSL_ASSERT( m_xFileRegistry.is() );
+ assert( m_xFileRegistry.is() );
return;
}
diff --git a/ucb/source/ucp/tdoc/tdoc_storage.cxx b/ucb/source/ucp/tdoc/tdoc_storage.cxx
index 39a0742d2ab8..ff8a0f67fe9d 100644
--- a/ucb/source/ucp/tdoc/tdoc_storage.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_storage.cxx
@@ -323,7 +323,7 @@ StorageElementFactory::createStream( const OUString & rUri,
void StorageElementFactory::releaseElement( Storage * pElement )
{
- OSL_ASSERT( pElement );
+ assert( pElement );
osl::MutexGuard aGuard( m_aMutex );
if ( pElement->m_aContainerIt != m_aMap.end() )
m_aMap.erase( pElement->m_aContainerIt );
diff --git a/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx b/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx
index eb001870c1f7..f1db26a59787 100644
--- a/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx
+++ b/ucb/source/ucp/webdav-neon/DAVSessionFactory.cxx
@@ -99,7 +99,7 @@ rtl::Reference< DAVSession > DAVSessionFactory::createDAVSession(
void DAVSessionFactory::releaseElement( DAVSession * pElement )
{
- OSL_ASSERT( pElement );
+ assert( pElement );
osl::MutexGuard aGuard( m_aMutex );
if ( pElement->m_aContainerIt != m_aMap.end() )
m_aMap.erase( pElement->m_aContainerIt );
diff --git a/ucb/source/ucp/webdav-neon/NeonSession.cxx b/ucb/source/ucp/webdav-neon/NeonSession.cxx
index 6e808ebe07d2..5d74ad40636c 100644
--- a/ucb/source/ucp/webdav-neon/NeonSession.cxx
+++ b/ucb/source/ucp/webdav-neon/NeonSession.cxx
@@ -351,7 +351,7 @@ extern "C" int NeonSession_CertificationNotify( void *userdata,
int,
const ne_ssl_certificate *cert )
{
- OSL_ASSERT( cert );
+ assert( cert );
NeonSession * pSession = static_cast< NeonSession * >( userdata );
uno::Reference< security::XCertificateContainer > xCertificateContainer;