mirror of
https://github.com/starovoid/rxing.git
synced 2026-07-26 04:12:34 +00:00
remove even more needless string conversions
This commit is contained in:
@@ -103,7 +103,7 @@ pub fn decode(
|
||||
// for (int i = 0; i < errorLocations.length; i++) {
|
||||
let position = received.len() as isize - 1 - field.log(errorLocations[i])? as isize;
|
||||
if position < 0 {
|
||||
return Err(Exceptions::checksum(file!().to_string()));
|
||||
return Err(Exceptions::checksum(file!()));
|
||||
}
|
||||
received[position as usize] =
|
||||
field.subtract(received[position as usize], errorMagnitudes[i]);
|
||||
@@ -140,7 +140,7 @@ fn runEuclideanAlgorithm(
|
||||
// Divide rLastLast by rLast, with quotient in q and remainder in r
|
||||
if rLast.isZero() {
|
||||
// Oops, Euclidean algorithm already terminated?
|
||||
return Err(Exceptions::checksum(file!().to_string()));
|
||||
return Err(Exceptions::checksum(file!()));
|
||||
}
|
||||
r = rLastLast;
|
||||
let mut q = ModulusPoly::getZero(field); //field.getZero();
|
||||
@@ -162,7 +162,7 @@ fn runEuclideanAlgorithm(
|
||||
|
||||
let sigmaTildeAtZero = t.getCoefficient(0);
|
||||
if sigmaTildeAtZero == 0 {
|
||||
return Err(Exceptions::checksum(file!().to_string()));
|
||||
return Err(Exceptions::checksum(file!()));
|
||||
}
|
||||
|
||||
let inverse = field.inverse(sigmaTildeAtZero)?;
|
||||
@@ -190,7 +190,7 @@ fn findErrorLocations(
|
||||
i += 1;
|
||||
}
|
||||
if e != numErrors {
|
||||
return Err(Exceptions::checksum(file!().to_string()));
|
||||
return Err(Exceptions::checksum(file!()));
|
||||
}
|
||||
Ok(result)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user