jenkins-bot has submitted this change and it was merged.

Change subject: Avoid function calls in a for loop test part
......................................................................


Avoid function calls in a for loop test part

Change-Id: Ief0976e3d1cd1da7074b1ed6d427153ccc189f18
---
M includes/diff/DairikiDiff.php
1 file changed, 2 insertions(+), 1 deletion(-)

Approvals:
  Chad: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/includes/diff/DairikiDiff.php b/includes/diff/DairikiDiff.php
index bb0cb5f..37f1e59 100644
--- a/includes/diff/DairikiDiff.php
+++ b/includes/diff/DairikiDiff.php
@@ -843,7 +843,8 @@
                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 ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/96558
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ief0976e3d1cd1da7074b1ed6d427153ccc189f18
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Siebrand <[email protected]>
Gerrit-Reviewer: Chad <[email protected]>
Gerrit-Reviewer: IAlex <[email protected]>
Gerrit-Reviewer: jenkins-bot

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to