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
This commit is contained in:
dswitkin@google.com 2011-05-17 20:44:44 +00:00
parent 11d348a59f
commit ab003c1686
3 changed files with 6 additions and 10 deletions

View file

@ -22,8 +22,7 @@ package com.google.zxing.common;
* @author Sean Owen * @author Sean Owen
*/ */
public final class BitArray { public final class BitArray {
// I have changed these members to be public so ProGuard can inline get() and set(). Ideally
// TODO: 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 // 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 // resulting binary at runtime on Android. If we find a solution to this, these should be changed
// back to private. // back to private.
@ -119,7 +118,7 @@ public final class BitArray {
if (end == start) { if (end == start) {
return true; // empty range matches 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 firstInt = start >> 5;
int lastInt = end >> 5; int lastInt = end >> 5;
for (int i = firstInt; i <= lastInt; i++) { for (int i = firstInt; i <= lastInt; i++) {
@ -232,7 +231,7 @@ public final class BitArray {
private static int[] makeArray(int size) { private static int[] makeArray(int size) {
return new int[(size + 31) >> 5]; return new int[(size + 31) >> 5];
} }
public String toString() { public String toString() {
StringBuffer result = new StringBuffer(size); StringBuffer result = new StringBuffer(size);
for (int i = 0; i < size; i++) { for (int i = 0; i < size; i++) {

View file

@ -32,8 +32,7 @@ package com.google.zxing.common;
* @author dswitkin@google.com (Daniel Switkin) * @author dswitkin@google.com (Daniel Switkin)
*/ */
public final class BitMatrix { public final class BitMatrix {
// Just like BitArray, these need to be public so ProGuard can inline them.
// TODO: Just like BitArray, these need to be public so ProGuard can inline them.
public final int width; public final int width;
public final int height; public final int height;
public final int rowSize; public final int rowSize;
@ -147,7 +146,7 @@ public final class BitMatrix {
/** /**
* This is useful in detecting a corner of a 'pure' barcode. * 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 * @return {x,y} coordinate of top-left-most 1 bit, or null if it is all white
*/ */
public int[] getTopLeftOnBit() { public int[] getTopLeftOnBit() {
@ -160,7 +159,7 @@ public final class BitMatrix {
} }
int y = bitsOffset / rowSize; int y = bitsOffset / rowSize;
int x = (bitsOffset % rowSize) << 5; int x = (bitsOffset % rowSize) << 5;
int theBits = bits[bitsOffset]; int theBits = bits[bitsOffset];
int bit = 0; int bit = 0;
while ((theBits << (31-bit)) == 0) { while ((theBits << (31-bit)) == 0) {

View file

@ -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 // 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. // 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) { if (secondPeak - firstPeak <= numBuckets >> 4) {
throw NotFoundException.getNotFoundInstance(); throw NotFoundException.getNotFoundInstance();
} }