From 9140ff3adcb0d34bdaef8fb8b73c96947c592ec0 Mon Sep 17 00:00:00 2001 From: Norbert Thiebaud Date: Sun, 21 Nov 2010 19:07:07 -0600 Subject: micro-optimization suggested by cppcheck --- forms/source/xforms/xpathlib/xpathlib.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'forms') diff --git a/forms/source/xforms/xpathlib/xpathlib.cxx b/forms/source/xforms/xpathlib/xpathlib.cxx index e91fa1a043f8..9a6f59a1592f 100644 --- a/forms/source/xforms/xpathlib/xpathlib.cxx +++ b/forms/source/xforms/xpathlib/xpathlib.cxx @@ -211,7 +211,7 @@ void xforms_countNonEmptyFunction(xmlXPathParserContextPtr ctxt, int nargs) for (int i = 0; i < xmlXPathNodeSetGetLength(pNodeSet); i++) { aString = xmlXPathCastNodeToString(xmlXPathNodeSetItem(pNodeSet, i)); - if (strlen((char*)aString) > 0) nNotEmpty++; + if (*aString != 0) nNotEmpty++; } xmlXPathReturnNumber(ctxt, nNotEmpty); } -- cgit v1.2.3