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:
smparkes@smparkes.net 2012-02-20 16:21:56 +00:00
parent 2b01d912d3
commit a3c1f26330

View file

@ -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_;
}