Simplify a few binary checks for bit 1
authorThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Fri, 17 May 2019 14:57:23 +0000 (16:57 +0200)
committerThiemo Kreuz <thiemo.kreuz@wikimedia.de>
Fri, 17 May 2019 14:57:23 +0000 (16:57 +0200)
commit65c42a6034e810505a2c2481c73c2fa04a45a659
tree3190bcb8b7909927e5832dc5354cd53c2702379f
parent48f1bf98a2a205ee82e942cc1316c788f6f25a56
Simplify a few binary checks for bit 1

( $var & 1 ) is either 0 or 1, which can be used as a boolean value.
The main advantage of this is that there is no confusion with the
operator precedence. In `$var & 1 !== 1` the `!==` is executed first,
effectively turning it into `$var & 0`. This always succeeds.

Change-Id: I53c81a3891d42b2660eefc311f1f0f2523104894
includes/diff/DiffEngine.php
includes/media/DjVuImage.php