Tiny optimizations to boolean logic to avoid extra byte code and branches in semi...
[zxing.git] / core / src / com / google / zxing / datamatrix / detector / Detector.java
index 4e47692..3cd2c1d 100644 (file)
@@ -231,7 +231,7 @@ public final class Detector {
     boolean inBlack = image.isBlack(steep ? fromY : fromX, steep ? fromX : fromY);
     for (int x = fromX, y = fromY; x != toX; x += xstep) {
       boolean isBlack = image.isBlack(steep ? y : x, steep ? x : y);
-      if (isBlack == !inBlack) {
+      if (isBlack != inBlack) {
         transitions++;
         inBlack = isBlack;
       }