diff options
author | Tomaž Vajngerl <tomaz.vajngerl@collabora.co.uk> | 2021-05-03 21:54:49 +0900 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2021-05-04 04:47:26 +0200 |
commit | 40b833351e4ffd7608ac82e79e21d189de2171ff (patch) | |
tree | 87a477b04bdcfa5310fdb23d9fc7bb346d9c570a /svgio | |
parent | 931e264590100c555580c413556e229a0f03316a (diff) |
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>
Diffstat (limited to 'svgio')
-rw-r--r-- | svgio/source/svgreader/SvgNumber.cxx | 6 | ||||
-rw-r--r-- | svgio/source/svgreader/svgtools.cxx | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/svgio/source/svgreader/SvgNumber.cxx b/svgio/source/svgreader/SvgNumber.cxx index 8254b45b035f..9a11c1979962 100644 --- a/svgio/source/svgreader/SvgNumber.cxx +++ b/svgio/source/svgreader/SvgNumber.cxx @@ -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; } diff --git a/svgio/source/svgreader/svgtools.cxx b/svgio/source/svgreader/svgtools.cxx index 75227939e489..5d6534db0721 100644 --- a/svgio/source/svgreader/svgtools.cxx +++ b/svgio/source/svgreader/svgtools.cxx @@ -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++; } } |