From ab003c16863f4297b2d84302ee32ebd667f78c3a Mon Sep 17 00:00:00 2001 From: "dswitkin@google.com" Date: Tue, 17 May 2011 20:44:44 +0000 Subject: [PATCH] More TODO cleanup on longstanding comments which aren't going to be addressed. git-svn-id: https://zxing.googlecode.com/svn/trunk@1779 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- core/src/com/google/zxing/common/BitArray.java | 7 +++---- core/src/com/google/zxing/common/BitMatrix.java | 7 +++---- .../com/google/zxing/common/GlobalHistogramBinarizer.java | 2 -- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/core/src/com/google/zxing/common/BitArray.java b/core/src/com/google/zxing/common/BitArray.java index 6c150bf8b..6eb0d57c6 100644 --- a/core/src/com/google/zxing/common/BitArray.java +++ b/core/src/com/google/zxing/common/BitArray.java @@ -22,8 +22,7 @@ package com.google.zxing.common; * @author Sean Owen */ public final class BitArray { - - // TODO: I have changed these members to be public so ProGuard can inline get() and set(). Ideally + // I have changed these members to be public so ProGuard can inline get() and set(). Ideally // they'd be private and we'd use the -allowaccessmodification flag, but Dalvik rejects the // resulting binary at runtime on Android. If we find a solution to this, these should be changed // back to private. @@ -119,7 +118,7 @@ public final class BitArray { if (end == start) { return true; // empty range matches } - end--; // will be easier to treat this as the last actually set bit -- inclusive + end--; // will be easier to treat this as the last actually set bit -- inclusive int firstInt = start >> 5; int lastInt = end >> 5; for (int i = firstInt; i <= lastInt; i++) { @@ -232,7 +231,7 @@ public final class BitArray { private static int[] makeArray(int size) { return new int[(size + 31) >> 5]; } - + public String toString() { StringBuffer result = new StringBuffer(size); for (int i = 0; i < size; i++) { diff --git a/core/src/com/google/zxing/common/BitMatrix.java b/core/src/com/google/zxing/common/BitMatrix.java index 140f1c3d4..8bf75b289 100755 --- a/core/src/com/google/zxing/common/BitMatrix.java +++ b/core/src/com/google/zxing/common/BitMatrix.java @@ -32,8 +32,7 @@ package com.google.zxing.common; * @author dswitkin@google.com (Daniel Switkin) */ public final class BitMatrix { - - // TODO: Just like BitArray, these need to be public so ProGuard can inline them. + // Just like BitArray, these need to be public so ProGuard can inline them. public final int width; public final int height; public final int rowSize; @@ -147,7 +146,7 @@ public final class BitMatrix { /** * This is useful in detecting a corner of a 'pure' barcode. - * + * * @return {x,y} coordinate of top-left-most 1 bit, or null if it is all white */ public int[] getTopLeftOnBit() { @@ -160,7 +159,7 @@ public final class BitMatrix { } int y = bitsOffset / rowSize; int x = (bitsOffset % rowSize) << 5; - + int theBits = bits[bitsOffset]; int bit = 0; while ((theBits << (31-bit)) == 0) { diff --git a/core/src/com/google/zxing/common/GlobalHistogramBinarizer.java b/core/src/com/google/zxing/common/GlobalHistogramBinarizer.java index 144c09905..4fa2a887b 100644 --- a/core/src/com/google/zxing/common/GlobalHistogramBinarizer.java +++ b/core/src/com/google/zxing/common/GlobalHistogramBinarizer.java @@ -172,8 +172,6 @@ public class GlobalHistogramBinarizer extends Binarizer { // If there is too little contrast in the image to pick a meaningful black point, throw rather // than waste time trying to decode the image, and risk false positives. - // TODO: It might be worth comparing the brightest and darkest pixels seen, rather than the - // two peaks, to determine the contrast. if (secondPeak - firstPeak <= numBuckets >> 4) { throw NotFoundException.getNotFoundInstance(); }