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/datamatrix/BC_DataMatrixVersion.h | |
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/datamatrix/BC_DataMatrixVersion.h')
-rw-r--r-- | xfa/src/fxbarcode/datamatrix/BC_DataMatrixVersion.h | 146 |
1 files changed, 66 insertions, 80 deletions
diff --git a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixVersion.h b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixVersion.h index 90f6509f0f..8e197b1f92 100644 --- a/xfa/src/fxbarcode/datamatrix/BC_DataMatrixVersion.h +++ b/xfa/src/fxbarcode/datamatrix/BC_DataMatrixVersion.h @@ -8,93 +8,79 @@ #define _BC_DATAMATRIXVERSION_H_
class ECBlocks;
class CBC_DataMatrixVersion;
-class ECB
-{
-public:
- ECB(int32_t count, int32_t dataCodewords)
- {
- m_count = count;
- m_dataCodewords = dataCodewords;
- }
+class ECB {
+ public:
+ ECB(int32_t count, int32_t dataCodewords) {
+ m_count = count;
+ m_dataCodewords = dataCodewords;
+ }
- int32_t GetCount()
- {
- return m_count;
- }
+ int32_t GetCount() { return m_count; }
- int32_t GetDataCodewords()
- {
- return m_dataCodewords;
- }
-private:
- int32_t m_count;
- int32_t m_dataCodewords;
+ int32_t GetDataCodewords() { return m_dataCodewords; }
+
+ private:
+ int32_t m_count;
+ int32_t m_dataCodewords;
};
-class ECBlocks
-{
-public:
- ECBlocks(int32_t ecCodewords, ECB *ecBlocks)
- {
- m_ecCodewords = ecCodewords;
- m_ecBlocks.Add(ecBlocks);
- }
+class ECBlocks {
+ public:
+ ECBlocks(int32_t ecCodewords, ECB* ecBlocks) {
+ m_ecCodewords = ecCodewords;
+ m_ecBlocks.Add(ecBlocks);
+ }
- ECBlocks(int32_t ecCodewords, ECB *ecBlocks1, ECB *ecBlocks2)
- {
- m_ecCodewords = ecCodewords;
- m_ecBlocks.Add(ecBlocks1);
- m_ecBlocks.Add(ecBlocks2);
- }
- ~ECBlocks()
- {
- for(int32_t i = 0; i < m_ecBlocks.GetSize(); i++) {
- delete (ECB*)m_ecBlocks[i];
- }
- m_ecBlocks.RemoveAll();
+ ECBlocks(int32_t ecCodewords, ECB* ecBlocks1, ECB* ecBlocks2) {
+ m_ecCodewords = ecCodewords;
+ m_ecBlocks.Add(ecBlocks1);
+ m_ecBlocks.Add(ecBlocks2);
+ }
+ ~ECBlocks() {
+ for (int32_t i = 0; i < m_ecBlocks.GetSize(); i++) {
+ delete (ECB*)m_ecBlocks[i];
}
+ m_ecBlocks.RemoveAll();
+ }
- int32_t GetECCodewords()
- {
- return m_ecCodewords;
- }
+ int32_t GetECCodewords() { return m_ecCodewords; }
- const CFX_PtrArray &GetECBlocks()
- {
- return m_ecBlocks;
- }
-private:
- int32_t m_ecCodewords;
- CFX_PtrArray m_ecBlocks;
+ const CFX_PtrArray& GetECBlocks() { return m_ecBlocks; }
+
+ private:
+ int32_t m_ecCodewords;
+ CFX_PtrArray m_ecBlocks;
};
-class CBC_DataMatrixVersion
-{
-public:
- CBC_DataMatrixVersion(int32_t versionNumber,
- int32_t symbolSizeRows,
- int32_t symbolSizeColumns,
- int32_t dataRegionSizeRows,
- int32_t dataRegionSizeColumns,
- ECBlocks *ecBlocks);
- virtual ~CBC_DataMatrixVersion();
- static void Initialize();
- static void Finalize();
- int32_t GetVersionNumber();
- int32_t GetSymbolSizeRows();
- int32_t GetSymbolSizeColumns();
- int32_t GetDataRegionSizeRows();
- int32_t GetDataRegionSizeColumns();
- int32_t GetTotalCodewords();
- ECBlocks *GetECBlocks();
- static CBC_DataMatrixVersion *GetVersionForDimensions(int32_t numRows, int32_t numColumns, int32_t &e);
- static void ReleaseAll();
-private:
- int32_t m_versionNumber;
- int32_t m_symbolSizeRows;
- int32_t m_symbolSizeColumns;
- int32_t m_dataRegionSizeRows;
- int32_t m_dataRegionSizeColumns;
- ECBlocks *m_ecBlocks;
- int32_t m_totalCodewords;
- static CFX_PtrArray* VERSIONS;
+class CBC_DataMatrixVersion {
+ public:
+ CBC_DataMatrixVersion(int32_t versionNumber,
+ int32_t symbolSizeRows,
+ int32_t symbolSizeColumns,
+ int32_t dataRegionSizeRows,
+ int32_t dataRegionSizeColumns,
+ ECBlocks* ecBlocks);
+ virtual ~CBC_DataMatrixVersion();
+ static void Initialize();
+ static void Finalize();
+ int32_t GetVersionNumber();
+ int32_t GetSymbolSizeRows();
+ int32_t GetSymbolSizeColumns();
+ int32_t GetDataRegionSizeRows();
+ int32_t GetDataRegionSizeColumns();
+ int32_t GetTotalCodewords();
+ ECBlocks* GetECBlocks();
+ static CBC_DataMatrixVersion* GetVersionForDimensions(int32_t numRows,
+ int32_t numColumns,
+ int32_t& e);
+ static void ReleaseAll();
+
+ private:
+ int32_t m_versionNumber;
+ int32_t m_symbolSizeRows;
+ int32_t m_symbolSizeColumns;
+ int32_t m_dataRegionSizeRows;
+ int32_t m_dataRegionSizeColumns;
+ ECBlocks* m_ecBlocks;
+ int32_t m_totalCodewords;
+ static CFX_PtrArray* VERSIONS;
};
#endif
|