You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xalan.apache.org by sa...@apache.org on 2002/06/13 14:43:49 UTC

cvs commit: xml-xalan/java/src/org/apache/xalan/xsltc/dom StepIterator.java

santiagopg    2002/06/13 05:43:49

  Modified:    java/src/org/apache/xalan/xsltc/dom StepIterator.java
  Log:
  Very minor optimization.
  
  Revision  Changes    Path
  1.12      +4 -9      xml-xalan/java/src/org/apache/xalan/xsltc/dom/StepIterator.java
  
  Index: StepIterator.java
  ===================================================================
  RCS file: /home/cvs/xml-xalan/java/src/org/apache/xalan/xsltc/dom/StepIterator.java,v
  retrieving revision 1.11
  retrieving revision 1.12
  diff -u -r1.11 -r1.12
  --- StepIterator.java	4 Dec 2001 10:30:07 -0000	1.11
  +++ StepIterator.java	13 Jun 2002 12:43:49 -0000	1.12
  @@ -104,12 +104,10 @@
   	if (_isRestartable) {
   	    // Set start node for left-hand iterator...
   	    _source.setStartNode(_startNode = node);
  +
   	    // ... and get start node for right-hand iterator from left-hand,
   	    // with special case for //* path - see ParentLocationPath
  -	    if (_includeSelf)
  -		_iterator.setStartNode(_startNode);
  -	    else
  -		_iterator.setStartNode(_source.next());
  +	    _iterator.setStartNode(_includeSelf ? _startNode : _source.next());
   	    return resetPosition();
   	}
   	return this;
  @@ -118,10 +116,7 @@
       public NodeIterator reset() {
   	_source.reset();
   	// Special case for //* path - see ParentLocationPath
  -	if (_includeSelf)
  -	    _iterator.setStartNode(_startNode);
  -	else
  -	    _iterator.setStartNode(_source.next());
  +	_iterator.setStartNode(_includeSelf ? _startNode : _source.next());
   	return resetPosition();
       }
       
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xalan-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xalan-cvs-help@xml.apache.org