From 249d75b2e8f56be1093b24843d3e33e6327d0b01 Mon Sep 17 00:00:00 2001 From: srowen Date: Mon, 2 Aug 2010 10:57:11 +0000 Subject: [PATCH] Issue 488 git-svn-id: https://zxing.googlecode.com/svn/trunk@1503 59b500cc-1b3d-0410-9834-0bbf25fbcc57 --- .../src/zxing/qrcode/detector/FinderPatternFinder.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cpp/core/src/zxing/qrcode/detector/FinderPatternFinder.cpp b/cpp/core/src/zxing/qrcode/detector/FinderPatternFinder.cpp index 8b46b0f2b..7dbd33434 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 a, Ref b) { + bool operator()(Ref a, Ref 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 a, Ref b) { - return b->getCount() - a->getCount(); + bool operator()(Ref a, Ref b) { + return a->getCount() < b->getCount(); } };