From c4fd6e223cd7b42b16020c3f72558bae6addafcb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=A1=E4=B8=96=E7=99=BD=E7=8E=89?= Date: Tue, 26 May 2015 10:48:23 +0800 Subject: [PATCH] change cstdlib abs to cmath abs(float). in mingw 4.9.1 abs(in castlib) is erro --- core/src/zxing/pdf417/detector/LinesSampler.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/core/src/zxing/pdf417/detector/LinesSampler.cpp b/core/src/zxing/pdf417/detector/LinesSampler.cpp index d9b6cb6..e5c7915 100644 --- a/core/src/zxing/pdf417/detector/LinesSampler.cpp +++ b/core/src/zxing/pdf417/detector/LinesSampler.cpp @@ -1,4 +1,4 @@ -// -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- +// -*- mode:c++; tab-width:2; indent-tabs-mode:nil; c-basic-offset:2 -*- /* * Copyright 2010, 2012 ZXing authors All rights reserved. * @@ -21,11 +21,12 @@ #include #include #include // vs12, std::min und std:max +#include using std::map; using std::vector; using std::min; -using std::abs; +//using std::abs; using zxing::pdf417::detector::LinesSampler; using zxing::pdf417::decoder::BitMatrixParser; using zxing::Ref; @@ -62,7 +63,7 @@ class VoteResult { this->vote = vote; } }; - + VoteResult getValueWithMaxVotes(map& votes) { VoteResult result; int maxVotes = 0;