svgio: instead of assert(false && ...) rather use SAL_WARN instead

Previously OSL_ENSURE was changed to assert(false && ...) which
wasn't a good idea as now we hit asserts in some cases, so rather
than that, use SAL_WARN instead.

Change-Id: I69740d71ae97a79ece56d77c3dd7d0ce83c9bb34
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/115040
Tested-by: Jenkins
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
This commit is contained in:
Tomaž Vajngerl 2021-05-03 21:54:49 +09:00 committed by Tomaž Vajngerl
parent 931e264590
commit 40b833351e
2 changed files with 5 additions and 5 deletions

View file

@ -27,7 +27,7 @@ double SvgNumber::solveNonPercentage(const InfoProvider& rInfoProvider) const
{
if (!isSet())
{
assert(false && "SvgNumber not set (!)");
SAL_WARN("svgio", "SvgNumber not set (!)");
return 0.0;
}
@ -56,7 +56,7 @@ double SvgNumber::solveNonPercentage(const InfoProvider& rInfoProvider) const
}
case SvgUnit::percent:
{
assert(false && "Do not use with percentage!");
SAL_WARN("svgio", "Do not use with percentage!");
break;
}
}
@ -68,7 +68,7 @@ double SvgNumber::solve(const InfoProvider& rInfoProvider, NumberType aNumberTyp
{
if (!isSet())
{
assert(false && "SvgNumber not set (!)");
SAL_WARN("svgio", "SvgNumber not set (!)");
return 0.0;
}

View file

@ -1046,7 +1046,7 @@ namespace svgio::svgreader
if(nInitPos == nPos)
{
assert(false && "Could not interpret on current position (!)");
SAL_WARN("svgio", "Could not interpret on current position (!)");
nPos++;
}
}
@ -1249,7 +1249,7 @@ namespace svgio::svgreader
if(nInitPos == nPos)
{
assert(false && "Could not interpret on current position (!)");
SAL_WARN("svgio", "Could not interpret on current position (!)");
nPos++;
}
}