Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

squid:UselessParenthesesCheck - Useless parentheses around expression… #6

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ public int[] getBitArray() {
public void reverse() {
int[] newBits = new int[bits.length];
// reverse all int's first
int len = ((size-1) / 32);
int len = (size-1) / 32;
int oldBitsLen = len + 1;
for (int i = 0; i < oldBitsLen; i++) {
long x = (long) bits[i];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ private static void encodeBinary(byte[] bytes,
if (count == 1 && startmode == TEXT_COMPACTION) {
sb.append((char) SHIFT_TO_BYTE);
} else {
boolean sixpack = ((count % 6) == 0);
boolean sixpack = (count % 6) == 0;
if (sixpack) {
sb.append((char)LATCH_TO_BYTE);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,13 +86,13 @@ static int numBitsDiffering(int a, int b) {
a ^= b; // a now has a 1 bit exactly where its bit differs with b's
// Count bits set quickly with a series of lookups:
return BITS_SET_IN_HALF_BYTE[a & 0x0F] +
BITS_SET_IN_HALF_BYTE[(a >>> 4 & 0x0F)] +
BITS_SET_IN_HALF_BYTE[(a >>> 8 & 0x0F)] +
BITS_SET_IN_HALF_BYTE[(a >>> 12 & 0x0F)] +
BITS_SET_IN_HALF_BYTE[(a >>> 16 & 0x0F)] +
BITS_SET_IN_HALF_BYTE[(a >>> 20 & 0x0F)] +
BITS_SET_IN_HALF_BYTE[(a >>> 24 & 0x0F)] +
BITS_SET_IN_HALF_BYTE[(a >>> 28 & 0x0F)];
BITS_SET_IN_HALF_BYTE[a >>> 4 & 0x0F] +
BITS_SET_IN_HALF_BYTE[a >>> 8 & 0x0F] +
BITS_SET_IN_HALF_BYTE[a >>> 12 & 0x0F] +
BITS_SET_IN_HALF_BYTE[a >>> 16 & 0x0F] +
BITS_SET_IN_HALF_BYTE[a >>> 20 & 0x0F] +
BITS_SET_IN_HALF_BYTE[a >>> 24 & 0x0F] +
BITS_SET_IN_HALF_BYTE[a >>> 28 & 0x0F];
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ public final void initiateScan(Collection<String> desiredBarcodeFormats, int cam
// intentScan.putExtra((Intents.Scan.FLASH), flash);

intentScan.putExtra(Intents.Scan.VIBRATE, vibrate);
intentScan.putExtra((Intents.Scan.BEEP), playBeep);
intentScan.putExtra(Intents.Scan.BEEP, playBeep);

if(iconID != null) intentScan.putExtra(Intents.Scan.ICON_ID,iconID);
if(toolbarColor != null) intentScan.putExtra(Intents.Scan.TOOLBAR_COLOR,toolbarColor);
Expand Down