mirror of
https://github.com/jezhiggins/arabica
synced 2024-11-17 07:48:50 +01:00
Fixed for predicate evaluation bug
see http://www.jezuk.co.uk/cgi-bin/view/arabica/news?id=2883
This commit is contained in:
parent
625c7141e1
commit
5caf17b989
1 changed files with 2 additions and 4 deletions
|
@ -118,6 +118,7 @@ private:
|
|||
const ExecutionContext<string_type, string_adaptor>& parentContext) const
|
||||
{
|
||||
AxisEnumerator<string_type, string_adaptor> enumerator(context, axis_);
|
||||
results.forward(enumerator.forward());
|
||||
NodeSet<string_type> intermediate(enumerator.forward());
|
||||
NodeSet<string_type>& d = (!baseT::has_predicates()) ? results : intermediate;
|
||||
while(*enumerator != 0)
|
||||
|
@ -130,14 +131,11 @@ private:
|
|||
} // while ...
|
||||
|
||||
if(!baseT::has_predicates())
|
||||
{
|
||||
results.forward(enumerator.forward());
|
||||
return;
|
||||
} // if ...
|
||||
|
||||
intermediate = baseT::applyPredicates(intermediate, parentContext);
|
||||
|
||||
results.swap(intermediate);
|
||||
results.insert(results.end(), intermediate.begin(), intermediate.end());
|
||||
} // enumerateOver
|
||||
|
||||
Axis axis_;
|
||||
|
|
Loading…
Reference in a new issue