mirror of
https://github.com/zxing/zxing.git
synced 2025-02-02 05:41:08 -08:00
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:
parent
11d348a59f
commit
ab003c1686
|
@ -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++) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue