From: Reedy Date: Wed, 26 Sep 2012 15:59:58 +0000 (+0100) Subject: Simplify getNewOffset() X-Git-Tag: 1.31.0-rc.0~22262^2 X-Git-Url: https://git.cyclocoop.org/%27.WWW_URL.%27admin/?a=commitdiff_plain;ds=sidebyside;h=ea73ea64ea194b84de3b111618dcfe8b3accf1d9;p=lhc%2Fweb%2Fwiklou.git Simplify getNewOffset() Remove @ingroup Diff comment which seems to have come from the extension Change-Id: I2a357bde2b4298315ef05a619a05b56b0ce4dca2 --- diff --git a/includes/libs/GenericArrayObject.php b/includes/libs/GenericArrayObject.php index b4b9d6108a..e72541c0df 100644 --- a/includes/libs/GenericArrayObject.php +++ b/includes/libs/GenericArrayObject.php @@ -28,7 +28,6 @@ * @since 1.20 * * @file - * @ingroup Diff * * @licence GNU GPL v2+ * @author Jeroen De Dauw < jeroendedauw@gmail.com > @@ -61,13 +60,11 @@ abstract class GenericArrayObject extends ArrayObject { * @return integer */ protected function getNewOffset() { - while ( true ) { - if ( !$this->offsetExists( $this->indexOffset ) ) { - return $this->indexOffset; - } - + while ( $this->offsetExists( $this->indexOffset ) ) { $this->indexOffset++; } + + return $this->indexOffset; } /**