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/common/BC_CommonByteMatrix.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/common/BC_CommonByteMatrix.cpp')
-rw-r--r-- | xfa/src/fxbarcode/common/BC_CommonByteMatrix.cpp | 72 |
1 files changed, 31 insertions, 41 deletions
diff --git a/xfa/src/fxbarcode/common/BC_CommonByteMatrix.cpp b/xfa/src/fxbarcode/common/BC_CommonByteMatrix.cpp index d963eb9f5e..ee4eee26a9 100644 --- a/xfa/src/fxbarcode/common/BC_CommonByteMatrix.cpp +++ b/xfa/src/fxbarcode/common/BC_CommonByteMatrix.cpp @@ -22,55 +22,45 @@ #include "../barcode.h"
#include "BC_CommonByteMatrix.h"
-CBC_CommonByteMatrix::CBC_CommonByteMatrix(int32_t width, int32_t height)
-{
- m_height = height;
- m_width = width;
- m_bytes = NULL;
+CBC_CommonByteMatrix::CBC_CommonByteMatrix(int32_t width, int32_t height) {
+ m_height = height;
+ m_width = width;
+ m_bytes = NULL;
}
-void CBC_CommonByteMatrix::Init()
-{
- m_bytes = FX_Alloc(uint8_t, m_height * m_width);
- FXSYS_memset(m_bytes, 0xff, m_height * m_width);
+void CBC_CommonByteMatrix::Init() {
+ m_bytes = FX_Alloc(uint8_t, m_height * m_width);
+ FXSYS_memset(m_bytes, 0xff, m_height * m_width);
}
-CBC_CommonByteMatrix::~CBC_CommonByteMatrix()
-{
- if(m_bytes != NULL) {
- FX_Free(m_bytes);
- m_bytes = NULL;
- }
+CBC_CommonByteMatrix::~CBC_CommonByteMatrix() {
+ if (m_bytes != NULL) {
+ FX_Free(m_bytes);
+ m_bytes = NULL;
+ }
}
-int32_t CBC_CommonByteMatrix::GetHeight()
-{
- return m_height;
+int32_t CBC_CommonByteMatrix::GetHeight() {
+ return m_height;
}
-int32_t CBC_CommonByteMatrix::GetWidth()
-{
- return m_width;
+int32_t CBC_CommonByteMatrix::GetWidth() {
+ return m_width;
}
-uint8_t CBC_CommonByteMatrix::Get(int32_t x, int32_t y)
-{
- return m_bytes[y * m_width + x];
+uint8_t CBC_CommonByteMatrix::Get(int32_t x, int32_t y) {
+ return m_bytes[y * m_width + x];
}
-void CBC_CommonByteMatrix::Set(int32_t x, int32_t y, int32_t value)
-{
- m_bytes[y * m_width + x] = (uint8_t)value;
+void CBC_CommonByteMatrix::Set(int32_t x, int32_t y, int32_t value) {
+ m_bytes[y * m_width + x] = (uint8_t)value;
}
-void CBC_CommonByteMatrix::Set(int32_t x, int32_t y, uint8_t value)
-{
- m_bytes[y * m_width + x] = value;
+void CBC_CommonByteMatrix::Set(int32_t x, int32_t y, uint8_t value) {
+ m_bytes[y * m_width + x] = value;
}
-void CBC_CommonByteMatrix::clear(uint8_t value)
-{
- int32_t y;
- for(y = 0; y < m_height; y++) {
- int32_t x;
- for(x = 0; x < m_width; x++) {
- m_bytes[y * m_width + x] = value;
- }
+void CBC_CommonByteMatrix::clear(uint8_t value) {
+ int32_t y;
+ for (y = 0; y < m_height; y++) {
+ int32_t x;
+ for (x = 0; x < m_width; x++) {
+ m_bytes[y * m_width + x] = value;
}
+ }
}
-uint8_t* CBC_CommonByteMatrix::GetArray()
-{
- return m_bytes;
+uint8_t* CBC_CommonByteMatrix::GetArray() {
+ return m_bytes;
}
|