[SCM] Multi-format 1D/2D barcode image processing library branch, upstream, updated. 24d4480bc48cf9eabf7b2bd2f528248b0e458809
srowen
srowen at 59b500cc-1b3d-0410-9834-0bbf25fbcc57
Wed Aug 4 01:32:40 UTC 2010
The following commit has been merged in the upstream branch:
commit 0e6081d08b35993a92025bc95a1f49c211532f52
Author: srowen <srowen at 59b500cc-1b3d-0410-9834-0bbf25fbcc57>
Date: Mon Aug 2 10:57:11 2010 +0000
Issue 488
git-svn-id: http://zxing.googlecode.com/svn/trunk@1503 59b500cc-1b3d-0410-9834-0bbf25fbcc57
diff --git a/cpp/core/src/zxing/qrcode/detector/FinderPatternFinder.cpp b/cpp/core/src/zxing/qrcode/detector/FinderPatternFinder.cpp
index 8b46b0f..7dbd334 100644
--- a/cpp/core/src/zxing/qrcode/detector/FinderPatternFinder.cpp
+++ b/cpp/core/src/zxing/qrcode/detector/FinderPatternFinder.cpp
@@ -39,17 +39,17 @@ public:
ClosestToAverageComparator(float averageModuleSize) :
averageModuleSize_(averageModuleSize) {
}
- int operator()(Ref<FinderPattern> a, Ref<FinderPattern> b) {
+ bool operator()(Ref<FinderPattern> a, Ref<FinderPattern> b) {
float dA = abs(a->getEstimatedModuleSize() - averageModuleSize_);
float dB = abs(b->getEstimatedModuleSize() - averageModuleSize_);
- return dA < dB ? -1 : dA > dB ? 1 : 0;
+ return dA < dB;
}
};
class CenterComparator {
public:
- int operator()(Ref<FinderPattern> a, Ref<FinderPattern> b) {
- return b->getCount() - a->getCount();
+ bool operator()(Ref<FinderPattern> a, Ref<FinderPattern> b) {
+ return a->getCount() < b->getCount();
}
};
--
Multi-format 1D/2D barcode image processing library
More information about the Pkg-google-commits
mailing list