Made the data members of BitArray public so they will be inlined. This saves about 60,000 function calls per rejected scan. We can make these private again once we figure out the ProGuard problems with -allowaccessmodification.

git-svn-id: https://zxing.googlecode.com/svn/trunk@653 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
dswitkin 2008-10-29 21:16:46 +00:00
parent 43e155804f
commit 4f7b7d573d

View file

@ -23,8 +23,12 @@ package com.google.zxing.common;
*/
public final class BitArray {
private int[] bits;
private final int size;
// 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
// resulting binary at runtime on Android. If we find a solution to this, these should be changed
// back to private.
public int[] bits;
public final int size;
public BitArray(int size) {
if (size < 1) {