svgio/source/svgreader/SvgNumber.cxx | 6 +++--- svgio/source/svgreader/svgtools.cxx | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-)
New commits: commit 40b833351e4ffd7608ac82e79e21d189de2171ff Author: Tomaž Vajngerl <tomaz.vajng...@collabora.co.uk> AuthorDate: Mon May 3 21:54:49 2021 +0900 Commit: Tomaž Vajngerl <qui...@gmail.com> CommitDate: Tue May 4 04:47:26 2021 +0200 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 <qui...@gmail.com> 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++; } } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits