slight performance improvement, detector

This commit is contained in:
Henry Schimke
2022-12-31 17:01:10 -06:00
parent a111776032
commit a6727220fa
11 changed files with 31 additions and 30 deletions

View File

@@ -29,10 +29,10 @@ use super::MultiFinderPatternFinder;
* @author Sean Owen
* @author Hannes Erven
*/
pub struct MultiDetector(Detector);
impl MultiDetector {
pub fn new(image: BitMatrix) -> Self {
Self(Detector::new(image))
pub struct MultiDetector<'a>(Detector<'a>);
impl<'a> MultiDetector<'_> {
pub fn new(image: &'a BitMatrix) -> MultiDetector<'a> {
MultiDetector(Detector::new(image))
}
// private static final DetectorRXingResult[] EMPTY_DETECTOR_RESULTS = new DetectorRXingResult[0];