dbertoni 01/02/08 13:45:36
Modified: c/src/XPath XPath.cpp
Log:
Cleaned up some critical code paths. Disabled use of custom locators since
we never use them.
Revision Changes Path
1.43 +14 -2 xml-xalan/c/src/XPath/XPath.cpp
Index: XPath.cpp
===================================================================
RCS file: /home/cvs/xml-xalan/c/src/XPath/XPath.cpp,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- XPath.cpp 2001/01/31 01:40:33 1.42
+++ XPath.cpp 2001/02/08 21:45:34 1.43
@@ -436,6 +436,9 @@
opPos += 2;
+#if 1
+ XLocator* const locator = m_defaultXLocator;
+#else
XLocator* locator =
executionContext.getXLocatorFromNode(context);
if(0 == locator)
@@ -443,6 +446,7 @@
locator = m_defaultXLocator;
}
assert(locator != 0);
+#endif
while(m_expression.m_opMap[opPos] ==
XPathExpression::eOP_LOCATIONPATHPATTERN &&
score == s_MatchScoreNone)
@@ -1190,14 +1194,18 @@
{
assert(context != 0);
+#if 1
+ XLocator* const locator = m_defaultXLocator;
+#else
XLocator* xlocator =
executionContext.getXLocatorFromNode(context);
if(0 == xlocator)
{
- xlocator = m_defaultXLocator;
+ locator = m_defaultXLocator;
}
+#endif
- return xlocator->locationPath(*this, executionContext, *context, opPos);
+ return locator->locationPath(*this, executionContext, *context, opPos);
}
@@ -1221,12 +1229,16 @@
{
assert(context != 0);
+#if 1
+ XLocator* const locator = m_defaultXLocator;
+#else
XLocator* locator = executionContext.getXLocatorFromNode(context);
if(0 == locator)
{
locator = m_defaultXLocator;
}
+#endif
const double result = locator->locationPathPattern(*this,
executionContext, *context, opPos);