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/pdf417/BC_PDF417BarcodeValue.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/pdf417/BC_PDF417BarcodeValue.cpp')
-rw-r--r-- | xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.cpp | 69 |
1 files changed, 31 insertions, 38 deletions
diff --git a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.cpp b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.cpp index 90fbea9897..5397c4f36f 100644 --- a/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.cpp +++ b/xfa/src/fxbarcode/pdf417/BC_PDF417BarcodeValue.cpp @@ -23,46 +23,39 @@ #include "../barcode.h"
#include "BC_PDF417Common.h"
#include "BC_PDF417BarcodeValue.h"
-CBC_BarcodeValue::CBC_BarcodeValue()
-{
-}
-CBC_BarcodeValue::~CBC_BarcodeValue()
-{
-}
-void CBC_BarcodeValue::setValue(int32_t value)
-{
- int32_t confidence = 0;
- for (int32_t i = 0; i < m_keys.GetSize(); i++) {
- if (m_keys.GetAt(i) == value) {
- confidence = m_values.GetAt(i);
- m_values.SetAt(i, confidence + 1);
- return;
- }
+CBC_BarcodeValue::CBC_BarcodeValue() {}
+CBC_BarcodeValue::~CBC_BarcodeValue() {}
+void CBC_BarcodeValue::setValue(int32_t value) {
+ int32_t confidence = 0;
+ for (int32_t i = 0; i < m_keys.GetSize(); i++) {
+ if (m_keys.GetAt(i) == value) {
+ confidence = m_values.GetAt(i);
+ m_values.SetAt(i, confidence + 1);
+ return;
}
- confidence = 1;
- m_keys.Add(value);
- m_values.Add(confidence);
+ }
+ confidence = 1;
+ m_keys.Add(value);
+ m_values.Add(confidence);
}
-CFX_Int32Array* CBC_BarcodeValue::getValue()
-{
- int32_t maxConfidence = -1;
- CFX_Int32Array* result = FX_NEW CFX_Int32Array;
- for (int32_t i = 0; i < m_keys.GetSize(); i++) {
- if (m_values.GetAt(i) > maxConfidence) {
- maxConfidence = m_values.GetAt(i);
- result->RemoveAll();
- result->Add(m_keys.GetAt(i));
- } else if (m_values.GetAt(i) == maxConfidence) {
- result->Add(m_keys.GetAt(i));
- }
+CFX_Int32Array* CBC_BarcodeValue::getValue() {
+ int32_t maxConfidence = -1;
+ CFX_Int32Array* result = FX_NEW CFX_Int32Array;
+ for (int32_t i = 0; i < m_keys.GetSize(); i++) {
+ if (m_values.GetAt(i) > maxConfidence) {
+ maxConfidence = m_values.GetAt(i);
+ result->RemoveAll();
+ result->Add(m_keys.GetAt(i));
+ } else if (m_values.GetAt(i) == maxConfidence) {
+ result->Add(m_keys.GetAt(i));
}
- return result;
+ }
+ return result;
}
-int32_t CBC_BarcodeValue::getConfidence(int32_t value)
-{
- for (int32_t i = 0; i < m_keys.GetSize(); i++)
- if (m_keys.GetAt(i) == value) {
- return m_values.GetAt(i);
- }
- return -1;
+int32_t CBC_BarcodeValue::getConfidence(int32_t value) {
+ for (int32_t i = 0; i < m_keys.GetSize(); i++)
+ if (m_keys.GetAt(i) == value) {
+ return m_values.GetAt(i);
+ }
+ return -1;
}
|