remove indirection for RxingResultPoint

Previously, the struct was passed around everywhere as a
reference. It only holds two floats, so there's no real
need for indirection. Now it's being passed as a value.
This commit is contained in:
Vukašin Stepanović
2023-02-15 14:42:07 +00:00
parent 145cf704fe
commit 6b7099a03b
12 changed files with 229 additions and 267 deletions

View File

@@ -68,7 +68,7 @@ pub fn decode(
leftRowIndicatorColumn = Some(getRowIndicatorColumn(
image,
boundingBox.clone(),
imageTopLeft.as_ref().unwrap(),
imageTopLeft.unwrap(),
true,
minCodewordWidth,
maxCodewordWidth,
@@ -78,7 +78,7 @@ pub fn decode(
rightRowIndicatorColumn = Some(getRowIndicatorColumn(
image,
boundingBox.clone(),
imageTopRight.as_ref().unwrap(),
imageTopRight.unwrap(),
false,
minCodewordWidth,
maxCodewordWidth,
@@ -358,7 +358,7 @@ fn getBarcodeMetadata<T: DetectionRXingResultRowIndicatorColumn>(
fn getRowIndicatorColumn<'a>(
image: &BitMatrix,
boundingBox: Rc<BoundingBox>,
startPoint: &RXingResultPoint,
startPoint: RXingResultPoint,
leftToRight: bool,
minCodewordWidth: u32,
maxCodewordWidth: u32,