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/BC_BinaryBitmap.cpp | 71 ++++++++++++++++------------------- 1 file changed, 32 insertions(+), 39 deletions(-) (limited to 'xfa/src/fxbarcode/BC_BinaryBitmap.cpp') diff --git a/xfa/src/fxbarcode/BC_BinaryBitmap.cpp b/xfa/src/fxbarcode/BC_BinaryBitmap.cpp index f37b49c478..1880670a8d 100644 --- a/xfa/src/fxbarcode/BC_BinaryBitmap.cpp +++ b/xfa/src/fxbarcode/BC_BinaryBitmap.cpp @@ -26,51 +26,44 @@ #include "BC_BinaryBitmap.h" #include "common/BC_CommonBitMatrix.h" #include "common/BC_CommonBitArray.h" -CBC_BinaryBitmap::CBC_BinaryBitmap(CBC_Binarizer *binarizer): m_binarizer(binarizer), m_matrix(NULL) -{ +CBC_BinaryBitmap::CBC_BinaryBitmap(CBC_Binarizer* binarizer) + : m_binarizer(binarizer), m_matrix(NULL) {} +CBC_BinaryBitmap::~CBC_BinaryBitmap() { + if (m_matrix != NULL) { + delete m_matrix; + } + m_matrix = NULL; } -CBC_BinaryBitmap::~CBC_BinaryBitmap() -{ - if (m_matrix != NULL) { - delete m_matrix; - } - m_matrix = NULL; +int32_t CBC_BinaryBitmap::GetHeight() { + return m_binarizer->GetLuminanceSource()->GetHeight(); } -int32_t CBC_BinaryBitmap::GetHeight() -{ - return m_binarizer->GetLuminanceSource()->GetHeight(); +int32_t CBC_BinaryBitmap::GetWidth() { + return m_binarizer->GetLuminanceSource()->GetWidth(); } -int32_t CBC_BinaryBitmap::GetWidth() -{ - return m_binarizer->GetLuminanceSource()->GetWidth(); +CBC_CommonBitMatrix* CBC_BinaryBitmap::GetMatrix(int32_t& e) { + if (m_matrix == NULL) { + m_matrix = m_binarizer->GetBlackMatrix(e); + BC_EXCEPTION_CHECK_ReturnValue(e, NULL); + } + return m_matrix; } -CBC_CommonBitMatrix *CBC_BinaryBitmap::GetMatrix(int32_t &e) -{ - if (m_matrix == NULL) { - m_matrix = m_binarizer->GetBlackMatrix(e); - BC_EXCEPTION_CHECK_ReturnValue(e, NULL); - } - return m_matrix; +FX_BOOL CBC_BinaryBitmap::IsCropSupported() { + return m_binarizer->GetLuminanceSource()->IsCropSupported(); } -FX_BOOL CBC_BinaryBitmap::IsCropSupported() -{ - return m_binarizer->GetLuminanceSource()->IsCropSupported(); +FX_BOOL CBC_BinaryBitmap::IsRotateSupported() { + return m_binarizer->GetLuminanceSource()->IsRotateSupported(); } -FX_BOOL CBC_BinaryBitmap::IsRotateSupported() -{ - return m_binarizer->GetLuminanceSource()->IsRotateSupported(); +CBC_CommonBitArray* CBC_BinaryBitmap::GetBlackRow(int32_t y, + CBC_CommonBitArray* row, + int32_t& e) { + CBC_CommonBitArray* temp = m_binarizer->GetBlackRow(y, row, e); + BC_EXCEPTION_CHECK_ReturnValue(e, NULL); + return temp; } -CBC_CommonBitArray *CBC_BinaryBitmap::GetBlackRow(int32_t y, CBC_CommonBitArray *row, int32_t &e) -{ - CBC_CommonBitArray *temp = m_binarizer->GetBlackRow(y, row, e); +CBC_CommonBitMatrix* CBC_BinaryBitmap::GetBlackMatrix(int32_t& e) { + if (m_matrix == NULL) { + m_matrix = m_binarizer->GetBlackMatrix(e); BC_EXCEPTION_CHECK_ReturnValue(e, NULL); - return temp; -} -CBC_CommonBitMatrix *CBC_BinaryBitmap::GetBlackMatrix(int32_t &e) -{ - if (m_matrix == NULL) { - m_matrix = m_binarizer->GetBlackMatrix(e); - BC_EXCEPTION_CHECK_ReturnValue(e, NULL); - } - return m_matrix; + } + return m_matrix; } -- cgit v1.2.3