summaryrefslogtreecommitdiff
path: root/xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.cpp
diff options
context:
space:
mode:
authorNico Weber <thakis@chromium.org>2015-08-04 13:00:21 -0700
committerNico Weber <thakis@chromium.org>2015-08-04 13:00:21 -0700
commit9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f (patch)
treec97037f398d714665aefccb6eb54d0969ad7030c /xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.cpp
parent780cee82236d1b3b0f9b01a22424e4b8ec9a6f12 (diff)
downloadpdfium-9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f.tar.xz
XFA: clang-format all pdfium code.
No behavior change. Generated by: find . -name '*.cpp' -o -name '*.h' | \ grep -E -v 'third_party|thirdparties|lpng_v163|tiff_v403' | \ xargs ../../buildtools/mac/clang-format -i Then manually merged https://codereview.chromium.org/1269223002/ See thread "tabs vs spaces" on pdfium@googlegroups.com for discussion. BUG=none
Diffstat (limited to 'xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.cpp')
-rw-r--r--xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.cpp73
1 files changed, 35 insertions, 38 deletions
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.cpp b/xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.cpp
index dc08fc1e77..80ec34f6cf 100644
--- a/xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.cpp
+++ b/xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.cpp
@@ -23,49 +23,46 @@
#include "../barcode.h"
#include "../BC_ResultPoint.h"
#include "BC_QRFinderPattern.h"
-CBC_QRFinderPattern::CBC_QRFinderPattern(FX_FLOAT x, FX_FLOAT posY, FX_FLOAT estimatedModuleSize):
- CBC_ResultPoint(x, posY),
- m_estimatedModuleSize(estimatedModuleSize), m_count(1)
-{
+CBC_QRFinderPattern::CBC_QRFinderPattern(FX_FLOAT x,
+ FX_FLOAT posY,
+ FX_FLOAT estimatedModuleSize)
+ : CBC_ResultPoint(x, posY),
+ m_estimatedModuleSize(estimatedModuleSize),
+ m_count(1) {}
+CBC_QRFinderPattern::~CBC_QRFinderPattern() {
+ m_count = 0;
+ m_x = 0.0f;
+ m_y = 0.0f;
+ m_estimatedModuleSize = 0.0f;
}
-CBC_QRFinderPattern::~CBC_QRFinderPattern()
-{
- m_count = 0;
- m_x = 0.0f;
- m_y = 0.0f;
- m_estimatedModuleSize = 0.0f;
+CBC_QRFinderPattern* CBC_QRFinderPattern::Clone() {
+ CBC_QRFinderPattern* temp =
+ FX_NEW CBC_QRFinderPattern(m_x, m_y, m_estimatedModuleSize);
+ temp->m_count = m_count;
+ return temp;
}
-CBC_QRFinderPattern *CBC_QRFinderPattern::Clone()
-{
- CBC_QRFinderPattern *temp = FX_NEW CBC_QRFinderPattern(m_x, m_y, m_estimatedModuleSize);
- temp->m_count = m_count;
- return temp;
+FX_FLOAT CBC_QRFinderPattern::GetEstimatedModuleSize() {
+ return m_estimatedModuleSize;
}
-FX_FLOAT CBC_QRFinderPattern::GetEstimatedModuleSize()
-{
- return m_estimatedModuleSize;
+int32_t CBC_QRFinderPattern::GetCount() {
+ return m_count;
}
-int32_t CBC_QRFinderPattern::GetCount()
-{
- return m_count;
+void CBC_QRFinderPattern::IncrementCount() {
+ m_count++;
}
-void CBC_QRFinderPattern::IncrementCount()
-{
- m_count++;
+FX_BOOL CBC_QRFinderPattern::AboutEquals(FX_FLOAT moduleSize,
+ FX_FLOAT i,
+ FX_FLOAT j) {
+ if ((fabs(i - GetY()) <= moduleSize) && (fabs(j - GetX()) <= moduleSize)) {
+ FX_FLOAT moduleSizeDiff = fabs(moduleSize - m_estimatedModuleSize);
+ return (moduleSizeDiff <= 1.0f) ||
+ (moduleSizeDiff / m_estimatedModuleSize <= 1.0f);
+ }
+ return false;
}
-FX_BOOL CBC_QRFinderPattern::AboutEquals(FX_FLOAT moduleSize, FX_FLOAT i, FX_FLOAT j)
-{
- if((fabs(i - GetY()) <= moduleSize) && (fabs(j - GetX()) <= moduleSize)) {
- FX_FLOAT moduleSizeDiff = fabs(moduleSize - m_estimatedModuleSize);
- return (moduleSizeDiff <= 1.0f) || (moduleSizeDiff / m_estimatedModuleSize <= 1.0f);
- }
- return false;
+FX_FLOAT CBC_QRFinderPattern::GetX() {
+ return m_x;
}
-FX_FLOAT CBC_QRFinderPattern::GetX()
-{
- return m_x;
-}
-FX_FLOAT CBC_QRFinderPattern::GetY()
-{
- return m_y;
+FX_FLOAT CBC_QRFinderPattern::GetY() {
+ return m_y;
}