[Libreoffice-commits] core.git: sax/source
Stephan Bergmann (via logerrit)
logerrit at kemper.freedesktop.org
Wed Nov 13 21:31:30 UTC 2019
sax/source/expatwrap/saxwriter.cxx | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
New commits:
commit 7e09d08807b5ba2fd8b9831557752a415bdad562
Author: Stephan Bergmann <sbergman at redhat.com>
AuthorDate: Wed Nov 13 18:39:35 2019 +0100
Commit: Stephan Bergmann <sbergman at redhat.com>
CommitDate: Wed Nov 13 22:30:31 2019 +0100
Fix useless assert(true) (which would never fire)
...and simplify the code a bit. It had been introduced with
0a1d5af2a18d6a062c45d65689fbce619922dcc8 "tdf#115429 sax: assert if exporting an
invalid XML attribute/element", apparently meant to be an assert(false) instead.
A `make check screenshot` didn't cause the (now active) assert to fire in my
local build.
Change-Id: I275661f290491ff2d094288522f98d77cb4662ec
Reviewed-on: https://gerrit.libreoffice.org/82631
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
Tested-by: Jenkins
diff --git a/sax/source/expatwrap/saxwriter.cxx b/sax/source/expatwrap/saxwriter.cxx
index 901682a5ca01..7eb599a5cfc6 100644
--- a/sax/source/expatwrap/saxwriter.cxx
+++ b/sax/source/expatwrap/saxwriter.cxx
@@ -578,10 +578,8 @@ void CheckValidName(OUString const& rName)
auto const c(rName[i]);
if (c == ':')
{
- if (hasColon)
- assert("only one colon allowed");
- else
- hasColon = true;
+ assert(!hasColon && "only one colon allowed");
+ hasColon = true;
}
else if (!rtl::isAsciiAlphanumeric(c) && c != '_' && c != '-' && c != '.' &&
!inrange(c, 0x00C0, 0x00D6) && !inrange(c, 0x00D8, 0x00F6) &&
More information about the Libreoffice-commits
mailing list