mirror of
https://github.com/zxing/zxing.git
synced 2025-01-27 11:01:00 -08:00
port recent GF tweak to C++
git-svn-id: https://zxing.googlecode.com/svn/trunk@2206 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
2b01d912d3
commit
a3c1f26330
|
@ -139,15 +139,9 @@ int GenericGF::multiply(int a, int b) {
|
|||
return 0;
|
||||
}
|
||||
|
||||
if (a < 0 || b < 0 || a >= size_ || b >= size_) {
|
||||
a++;
|
||||
return expTable_[(logTable_[a] + logTable_[b]) % (size_ - 1)];
|
||||
}
|
||||
|
||||
int logSum = logTable_[a] + logTable_[b];
|
||||
|
||||
return expTable_[(logSum % size_) + logSum / size_];
|
||||
}
|
||||
|
||||
int GenericGF::getSize() {
|
||||
return size_;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue