[Libreoffice-commits] core.git: include/xmlreader
Stephan Bergmann
sbergman at redhat.com
Wed Oct 22 02:46:50 PDT 2014
include/xmlreader/span.hxx | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
New commits:
commit 4b89bd55b094ff5ed0162e2f34cd560fbf47e524
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Wed Oct 22 11:46:23 2014 +0200
Speed up xmlreader::Span::equals
Change-Id: Id1613a100e96667717cc32f44f84c0916055ea01
diff --git a/include/xmlreader/span.hxx b/include/xmlreader/span.hxx
index 5e85cd0..b44c0eb 100644
--- a/include/xmlreader/span.hxx
+++ b/include/xmlreader/span.hxx
@@ -50,8 +50,10 @@ struct OOO_DLLPUBLIC_XMLREADER Span {
inline bool is() const { return begin != 0; }
inline bool equals(Span const & text) const {
- return rtl_str_compare_WithLength(
- begin, length, text.begin, text.length) == 0;
+ return length == text.length
+ && (rtl_str_compare_WithLength(
+ begin, length, text.begin, text.length)
+ == 0);
}
inline bool equals(char const * textBegin, sal_Int32 textLength) const {
More information about the Libreoffice-commits
mailing list