Changes to the matrix and debug classes to make some tests pass.

I'm not super happy about making LOG_INFO a noop, but I don't know the general
solution off hand.

In any case, MatrixUtilTestCase and MaskUtilTestCase both pass now.


git-svn-id: https://zxing.googlecode.com/svn/trunk@729 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
ccmysen 2008-11-19 09:26:54 +00:00
parent 581464ad21
commit a16d3ba6ef
2 changed files with 6 additions and 2 deletions

View file

@ -31,7 +31,11 @@ public class Debug {
} }
public static void LOG_INFO(String message) { public static void LOG_INFO(String message) {
throw new RuntimeException(message); // Chris M -- throwing RuntimeException in an INFO function seems terribly
// strange and violates my assumptions about logging information. Even
// ERROR is borderline since it's effectively going to go unchecked by most
// callers. There has to be a more general way to do this.
// throw new RuntimeException(message);
} }
public static void DCHECK(boolean condition) { public static void DCHECK(boolean condition) {

View file

@ -291,7 +291,7 @@ public final class MatrixUtil {
public static int FindMSBSet(int value) { public static int FindMSBSet(int value) {
int num_digits = 0; int num_digits = 0;
while (value != 0) { while (value != 0) {
value >>= 1; value >>>= 1;
++num_digits; ++num_digits;
} }
return num_digits; return num_digits;