From 9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f Mon Sep 17 00:00:00 2001 From: Nico Weber Date: Tue, 4 Aug 2015 13:00:21 -0700 Subject: 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 --- xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.cpp | 73 ++++++++++++------------- 1 file changed, 35 insertions(+), 38 deletions(-) (limited to 'xfa/src/fxbarcode/qrcode/BC_QRFinderPattern.cpp') 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; } -- cgit v1.2.3