From: Siebrand Mazeland Date: Wed, 20 Nov 2013 19:22:26 +0000 (+0100) Subject: Avoid function calls in a for loop test part X-Git-Tag: 1.31.0-rc.0~17987^2~2 X-Git-Url: http://git.cyclocoop.org/%24action?a=commitdiff_plain;h=27edd5708d2f41a7f1239c7faa8ce2d3b3da97a4;p=lhc%2Fweb%2Fwiklou.git Avoid function calls in a for loop test part Change-Id: Ief0976e3d1cd1da7074b1ed6d427153ccc189f18 --- diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php index bb0cb5fc98..37f1e59bff 100644 --- a/includes/diff/DairikiDiff.php +++ b/includes/diff/DairikiDiff.php @@ -843,7 +843,8 @@ class MappedDiff extends Diff { parent::__construct( $mapped_from_lines, $mapped_to_lines ); $xi = $yi = 0; - for ( $i = 0; $i < count( $this->edits ); $i++ ) { + $editCount = count( $this->edits ); + for ( $i = 0; $i < $editCount; $i++ ) { $orig = &$this->edits[$i]->orig; if ( is_array( $orig ) ) { $orig = array_slice( $from_lines, $xi, count( $orig ) );