From f4da706256bbf3d7828419c97ffbfa98d4d48120 Mon Sep 17 00:00:00 2001 From: Chris Sherlock Date: Sun, 7 May 2017 08:47:32 +1000 Subject: tdf#43157: convert unotools from OSL_ASSERT to assert Change-Id: Ifa8dc619f0f401ccbbc2a6985ca2713e2d78da5e --- unotools/source/config/bootstrap.cxx | 14 +++++++++----- unotools/source/config/confignode.cxx | 2 +- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/unotools/source/config/bootstrap.cxx b/unotools/source/config/bootstrap.cxx index f74185572544..177b506d6457 100644 --- a/unotools/source/config/bootstrap.cxx +++ b/unotools/source/config/bootstrap.cxx @@ -334,7 +334,7 @@ static PathStatus getDerivedPath( aStatus = checkStatusAndNormalizeURL(sDerivedURL); else // the relative appendix must be valid - OSL_ASSERT(aStatus != Bootstrap::PATH_VALID || dbgCheckStatusOfURL(sDerivedURL) == Bootstrap::PATH_VALID); + assert(aStatus != Bootstrap::PATH_VALID || dbgCheckStatusOfURL(sDerivedURL) == Bootstrap::PATH_VALID); _rData.getFrom(_sBootstrapParameter, _rURL, sDerivedURL); @@ -349,7 +349,7 @@ static PathStatus getDerivedPath( _rURL = _aBaseURL; // if we have no data it can't be a valid path - OSL_ASSERT( aStatus > Bootstrap::PATH_VALID ); + assert( aStatus > Bootstrap::PATH_VALID ); } return aStatus; @@ -467,7 +467,7 @@ static Bootstrap::FailureCode describeError(OUStringBuffer& _rBuf, Bootstrap::Im addUnexpectedError(_rBuf,""); break; - default: OSL_ASSERT(false); + default: assert(false); addUnexpectedError(_rBuf); break; } @@ -513,7 +513,10 @@ static Bootstrap::FailureCode describeError(OUStringBuffer& _rBuf, Bootstrap::Im eErrCode = Bootstrap::INVALID_BOOTSTRAP_FILE_ENTRY; break; - case Bootstrap::DATA_INVALID: OSL_ASSERT(false); SAL_FALLTHROUGH; + case Bootstrap::DATA_INVALID: + assert(false); + SAL_FALLTHROUGH; + case Bootstrap::PATH_VALID: addFileError(_rBuf, _rData.aBootstrapINI_.path, IS_MISSING); eErrCode = Bootstrap::MISSING_BOOTSTRAP_FILE; @@ -527,7 +530,8 @@ static Bootstrap::FailureCode describeError(OUStringBuffer& _rBuf, Bootstrap::Im } break; - default: OSL_ASSERT(false); + default: + assert(false); addUnexpectedError(_rBuf); break; } diff --git a/unotools/source/config/confignode.cxx b/unotools/source/config/confignode.cxx index c0dc0043a6e0..6638fee7929f 100644 --- a/unotools/source/config/confignode.cxx +++ b/unotools/source/config/confignode.cxx @@ -395,7 +395,7 @@ namespace utl // check if the name refers to a indirect descendant else if (m_xHierarchyAccess.is() && m_xHierarchyAccess->hasByHierarchicalName(_rPath)) { - OSL_ASSERT(!_rPath.isEmpty()); + assert(!_rPath.isEmpty()); OUString sParentPath, sLocalName; -- cgit