diff options
author | Nico Weber <thakis@chromium.org> | 2015-08-04 13:00:21 -0700 |
---|---|---|
committer | Nico Weber <thakis@chromium.org> | 2015-08-04 13:00:21 -0700 |
commit | 9d8ec5a6e37e8d1d4d4edca9040de234e2d4728f (patch) | |
tree | c97037f398d714665aefccb6eb54d0969ad7030c /xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp | |
parent | 780cee82236d1b3b0f9b01a22424e4b8ec9a6f12 (diff) | |
download | pdfium-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_QRAlignmentPattern.cpp')
-rw-r--r-- | xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp | 43 |
1 files changed, 20 insertions, 23 deletions
diff --git a/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp b/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp index e1ee168e72..72738cd8d9 100644 --- a/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp +++ b/xfa/src/fxbarcode/qrcode/BC_QRAlignmentPattern.cpp @@ -23,30 +23,27 @@ #include "../barcode.h"
#include "../BC_ResultPoint.h"
#include "BC_QRAlignmentPattern.h"
-CBC_QRAlignmentPattern::CBC_QRAlignmentPattern(FX_FLOAT posX, FX_FLOAT posY, FX_FLOAT estimateModuleSize):
- CBC_ResultPoint(posX, posY), m_moduleSize(estimateModuleSize)
-{
+CBC_QRAlignmentPattern::CBC_QRAlignmentPattern(FX_FLOAT posX,
+ FX_FLOAT posY,
+ FX_FLOAT estimateModuleSize)
+ : CBC_ResultPoint(posX, posY), m_moduleSize(estimateModuleSize) {}
+CBC_QRAlignmentPattern::~CBC_QRAlignmentPattern() {}
+FX_FLOAT CBC_QRAlignmentPattern::GetX() {
+ return m_x;
}
-CBC_QRAlignmentPattern::~CBC_QRAlignmentPattern()
-{
+FX_FLOAT CBC_QRAlignmentPattern::GetY() {
+ return m_y;
}
-FX_FLOAT CBC_QRAlignmentPattern::GetX()
-{
- return m_x;
+FX_BOOL CBC_QRAlignmentPattern::AboutEquals(FX_FLOAT moduleSize,
+ FX_FLOAT i,
+ FX_FLOAT j) {
+ if ((FXSYS_fabs(i - GetY()) <= moduleSize) &&
+ (FXSYS_fabs(j - GetX()) <= moduleSize)) {
+ FX_FLOAT moduleSizeDiff = FXSYS_fabs(moduleSize - m_moduleSize);
+ return (moduleSizeDiff <= 1.0f) || (moduleSizeDiff / m_moduleSize <= 1.0f);
+ }
+ return FALSE;
}
-FX_FLOAT CBC_QRAlignmentPattern::GetY()
-{
- return m_y;
-}
-FX_BOOL CBC_QRAlignmentPattern::AboutEquals(FX_FLOAT moduleSize, FX_FLOAT i, FX_FLOAT j)
-{
- if ((FXSYS_fabs(i - GetY()) <= moduleSize) && (FXSYS_fabs(j - GetX()) <= moduleSize)) {
- FX_FLOAT moduleSizeDiff = FXSYS_fabs(moduleSize - m_moduleSize);
- return (moduleSizeDiff <= 1.0f) || (moduleSizeDiff / m_moduleSize <= 1.0f);
- }
- return FALSE;
-}
-CBC_QRAlignmentPattern *CBC_QRAlignmentPattern::Clone()
-{
- return FX_NEW CBC_QRAlignmentPattern(m_x, m_y, m_moduleSize);
+CBC_QRAlignmentPattern* CBC_QRAlignmentPattern::Clone() {
+ return FX_NEW CBC_QRAlignmentPattern(m_x, m_y, m_moduleSize);
}
|