summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-10-15 06:05:49 +0000
committerArseny Kapoulkine <arseny.kapoulkine@gmail.com>2014-10-15 06:05:49 +0000
commit883031fb45cf0f86cd36b20ad4762da58dd6126c (patch)
treebaf9fdd70eaa8c6b7e52d74b2e4a478f72a799c7 /src
parent87d4f03187c66181c47696f879542b5bf911e8c4 (diff)
XPath: Fix optimization bug with //name[last()]
The actual condition for the optimization is invariance from context list -- this includes both position() and last(). Instead of splitting the posinv concept just include last() into non-posinv expressions - this requires sorting for boolean predicates that depend on last() and do not depend on position(). These cases should be very rare. git-svn-id: https://pugixml.googlecode.com/svn/trunk@1060 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'src')
-rw-r--r--src/pugixml.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/pugixml.cpp b/src/pugixml.cpp
index 7db62d0..484f34b 100644
--- a/src/pugixml.cpp
+++ b/src/pugixml.cpp
@@ -9621,6 +9621,7 @@ PUGI__NS_BEGIN
switch (_type)
{
case ast_func_position:
+ case ast_func_last:
return false;
case ast_string_constant: