[Libreoffice-commits] libvisio.git: src/lib
Fridrich Štrba
fridrich.strba at bluewin.ch
Tue Dec 15 09:23:48 PST 2015
src/lib/VSDXParser.cpp | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
New commits:
commit eb215fd49bd9dff8bbf3e5f37aede7036afffec9
Author: Fridrich Štrba <fridrich.strba at bluewin.ch>
Date: Tue Dec 15 18:23:24 2015 +0100
micro-optimization
Change-Id: If726061c9e4f543a4f174b35a40fc79d333d9fcc
diff --git a/src/lib/VSDXParser.cpp b/src/lib/VSDXParser.cpp
index b8ef91b..55b2d20 100644
--- a/src/lib/VSDXParser.cpp
+++ b/src/lib/VSDXParser.cpp
@@ -576,9 +576,9 @@ int libvisio::VSDXParser::getElementToken(xmlTextReaderPtr reader)
tokenId = VSDXMLTokenMap::getTokenId(stringValue);
if (tokenId == XML_TOKEN_INVALID)
{
- if (!strncmp((char *)stringValue, "Position", 8))
+ if (*stringValue == 'P' && !strncmp((char *)stringValue, "Position", 8))
tokenId = XML_POSITION;
- else if (!strncmp((char *)stringValue, "Alignment", 9))
+ else if (*stringValue == 'A' && !strncmp((char *)stringValue, "Alignment", 9))
tokenId = XML_ALIGNMENT;
}
}
More information about the Libreoffice-commits
mailing list