Index: trunk/phase3/includes/diff/DairikiDiff.php |
— | — | @@ -371,7 +371,7 @@ |
372 | 372 | } |
373 | 373 | $matches = $ymatches[$line]; |
374 | 374 | reset( $matches ); |
375 | | - foreach ( $matches as $y ) { |
| 375 | + while ( list( , $y ) = each( $matches ) ) { |
376 | 376 | if ( empty( $this->in_seq[$y] ) ) { |
377 | 377 | $k = $this->_lcs_pos( $y ); |
378 | 378 | assert( $k > 0 ); |
— | — | @@ -379,7 +379,7 @@ |
380 | 380 | break; |
381 | 381 | } |
382 | 382 | } |
383 | | - foreach ( $matches as $y ) { |
| 383 | + while ( list ( , $y ) = each( $matches ) ) { |
384 | 384 | if ( $y > $this->seq[$k -1] ) { |
385 | 385 | assert( $y < $this->seq[$k] ); |
386 | 386 | // Optimization: this is a common case: |
— | — | @@ -493,7 +493,7 @@ |
494 | 494 | // Use the partitions to split this problem into subproblems. |
495 | 495 | reset( $seps ); |
496 | 496 | $pt1 = $seps[0]; |
497 | | - foreach ( $seps as $pt2 ) { |
| 497 | + while ( $pt2 = next( $seps ) ) { |
498 | 498 | $this->_compareseq ( $pt1[0], $pt2[0], $pt1[1], $pt2[1] ); |
499 | 499 | $pt1 = $pt2; |
500 | 500 | } |