mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 12:22:34 +00:00
warning cleanup
This commit is contained in:
@@ -64,11 +64,11 @@ impl DataBlock {
|
||||
let ecBlocks = version.getECBlocksForLevel(ecLevel);
|
||||
|
||||
// First count the total number of data blocks
|
||||
let mut totalBlocks = 0;
|
||||
let mut _totalBlocks = 0;
|
||||
let ecBlockArray = ecBlocks.getECBlocks();
|
||||
for ecBlock in ecBlockArray {
|
||||
// for (Version.ECB ecBlock : ecBlockArray) {
|
||||
totalBlocks += ecBlock.getCount();
|
||||
_totalBlocks += ecBlock.getCount();
|
||||
}
|
||||
|
||||
// Now establish DataBlocks of the appropriate size and number of data codewords
|
||||
|
||||
@@ -36,7 +36,7 @@ use super::{decoded_bit_stream_parser, BitMatrixParser, DataBlock, QRCodeDecoder
|
||||
|
||||
lazy_static! {
|
||||
//rsDecoder = new ReedSolomonDecoder(GenericGF.QR_CODE_FIELD_256);
|
||||
static ref rsDecoder : ReedSolomonDecoder = ReedSolomonDecoder::new(get_predefined_genericgf(PredefinedGenericGF::QrCodeField256));
|
||||
static ref RS_DECODER : ReedSolomonDecoder = ReedSolomonDecoder::new(get_predefined_genericgf(PredefinedGenericGF::QrCodeField256));
|
||||
}
|
||||
|
||||
pub fn decode_bool_array(image: &Vec<Vec<bool>>) -> Result<DecoderRXingResult, Exceptions> {
|
||||
@@ -200,7 +200,7 @@ fn correctErrors(codewordBytes: &mut [u8], numDataCodewords: usize) -> Result<()
|
||||
|
||||
let mut sending_code_words : Vec<i32> = codewordsInts.iter().map(|x| *x as i32).collect();
|
||||
|
||||
if let Err(e) = rsDecoder.decode(
|
||||
if let Err(e) = RS_DECODER.decode(
|
||||
&mut sending_code_words,
|
||||
(codewordBytes.len() - numDataCodewords) as i32,
|
||||
) {
|
||||
|
||||
@@ -134,7 +134,7 @@ impl FormatInformation {
|
||||
if masked_format_info1 != masked_format_info2 {
|
||||
// also try the other option
|
||||
bits_difference = Self::numBitsDiffering(masked_format_info2, targetInfo);
|
||||
if (bits_difference < best_difference) {
|
||||
if bits_difference < best_difference {
|
||||
best_format_info = decodeInfo[1] as u8;
|
||||
best_difference = bits_difference;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user