projects
/
zxing.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Renaming two member variables so they no longer share names with their getters.
[zxing.git]
/
core
/
src
/
com
/
google
/
zxing
/
common
/
reedsolomon
/
GF256Poly.java
diff --git
a/core/src/com/google/zxing/common/reedsolomon/GF256Poly.java
b/core/src/com/google/zxing/common/reedsolomon/GF256Poly.java
index
f5968c1
..
022e2f7
100644
(file)
--- a/
core/src/com/google/zxing/common/reedsolomon/GF256Poly.java
+++ b/
core/src/com/google/zxing/common/reedsolomon/GF256Poly.java
@@
-1,5
+1,5
@@
/*
/*
- * Copyright 2007
Google Inc.
+ * Copyright 2007
ZXing authors
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@
-44,16
+44,17
@@
final class GF256Poly {
throw new IllegalArgumentException();
}
this.field = field;
throw new IllegalArgumentException();
}
this.field = field;
- if (coefficients.length > 1 && coefficients[0] == 0) {
+ int coefficientsLength = coefficients.length;
+ if (coefficientsLength > 1 && coefficients[0] == 0) {
// Leading term must be non-zero for anything except the constant polynomial "0"
int firstNonZero = 1;
// Leading term must be non-zero for anything except the constant polynomial "0"
int firstNonZero = 1;
- while (firstNonZero < coefficients
.l
ength && coefficients[firstNonZero] == 0) {
+ while (firstNonZero < coefficients
L
ength && coefficients[firstNonZero] == 0) {
firstNonZero++;
}
firstNonZero++;
}
- if (firstNonZero == coefficients
.l
ength) {
+ if (firstNonZero == coefficients
L
ength) {
this.coefficients = field.getZero().coefficients;
} else {
this.coefficients = field.getZero().coefficients;
} else {
- this.coefficients = new int[coefficients
.l
ength - firstNonZero];
+ this.coefficients = new int[coefficients
L
ength - firstNonZero];
System.arraycopy(coefficients,
firstNonZero,
this.coefficients,
System.arraycopy(coefficients,
firstNonZero,
this.coefficients,
@@
-190,9
+191,8
@@
final class GF256Poly {
}
int size = coefficients.length;
int[] product = new int[size];
}
int size = coefficients.length;
int[] product = new int[size];
- System.arraycopy(coefficients, 0, product, 0, size);
for (int i = 0; i < size; i++) {
for (int i = 0; i < size; i++) {
- product[i] = field.multiply(
product
[i], scalar);
+ product[i] = field.multiply(
coefficients
[i], scalar);
}
return new GF256Poly(field, product);
}
}
return new GF256Poly(field, product);
}
@@
-206,9
+206,8
@@
final class GF256Poly {
}
int size = coefficients.length;
int[] product = new int[size + degree];
}
int size = coefficients.length;
int[] product = new int[size + degree];
- System.arraycopy(coefficients, 0, product, 0, size);
for (int i = 0; i < size; i++) {
for (int i = 0; i < size; i++) {
- product[i] = field.multiply(
product
[i], coefficient);
+ product[i] = field.multiply(
coefficients
[i], coefficient);
}
return new GF256Poly(field, product);
}
}
return new GF256Poly(field, product);
}