mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
switch to using Point in one-d-derive macros
Also start updates to make point more generic, still not complete or fully implemented. Some code cleanup
This commit is contained in:
@@ -159,7 +159,7 @@ impl BitSource {
|
||||
let mask = (0xFF >> bits_to_not_read) << bits_to_not_read;
|
||||
result = (result << num_bits)
|
||||
| ((self.bytes[byte_offset] & mask) as u32 >> bits_to_not_read);
|
||||
bit_offset += num_bits;
|
||||
//bit_offset += num_bits; // Removed, this is a holdover from setting the actual values in c++
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -228,9 +228,10 @@ impl<'a> PatternView<'a> {
|
||||
let mut size = size.unwrap_or(0);
|
||||
if size == 0 {
|
||||
size = self.count - offset;
|
||||
} else if size < 0 {
|
||||
size += self.count - offset;
|
||||
}
|
||||
}
|
||||
// else if size < 0 {
|
||||
// size += self.count - offset;
|
||||
// }
|
||||
|
||||
PatternView {
|
||||
data: self.data,
|
||||
|
||||
Reference in New Issue
Block a user