ucb/source/regexp/regexp.cxx | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-)
New commits: commit 7e5b36af8c524671a30b91dd2323d812686aca2c Author: Arnaud Versini <[email protected]> Date: Sun Jun 12 20:54:33 2016 +0200 UCB: Simplify ucb_impl::Regexp rtl/character.hxx usage. Change-Id: I2298732602ad6f5acc040673f550040802ec580c Reviewed-on: https://gerrit.libreoffice.org/26328 Tested-by: Jenkins <[email protected]> Reviewed-by: Arnaud Versini <[email protected]> diff --git a/ucb/source/regexp/regexp.cxx b/ucb/source/regexp/regexp.cxx index fae2aee..28e5940 100644 --- a/ucb/source/regexp/regexp.cxx +++ b/ucb/source/regexp/regexp.cxx @@ -67,13 +67,7 @@ bool matchStringIgnoreCase(sal_Unicode const ** pBegin, while (q != qEnd) { - sal_Unicode c1 = *p++; - sal_Unicode c2 = *q++; - if (c1 >= 'a' && c1 <= 'z') - c1 -= 'a' - 'A'; - if (c2 >= 'a' && c2 <= 'z') - c2 -= 'a' - 'A'; - if (c1 != c2) + if (rtl::compareIgnoreAsciiCase(*p++, *q++) != 0) return false; } @@ -183,7 +177,7 @@ bool isScheme(OUString const & rString, bool bColon) if (p == pEnd) return !bColon; sal_Unicode c = *p++; - if (!(rtl::isAsciiAlpha(c) || rtl::isAsciiDigit(c) + if (!(rtl::isAsciiAlphanumeric(c) || c == '+' || c == '-' || c == '.')) return bColon && c == ':' && p == pEnd; } _______________________________________________ Libreoffice-commits mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits
