diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-07-03 15:57:03 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-03 15:57:03 +0000 |
commit | 1c14ae2fbe1ae95dac3a7f5e60d049d9630aef02 (patch) | |
tree | 2d121ae2a0436adce5c54379d1824b427dd03359 /fxbarcode/common/BC_CommonBitMatrix.h | |
parent | d77e0ed72f73fb63305d04953ef03e2edab82d34 (diff) | |
download | pdfium-1c14ae2fbe1ae95dac3a7f5e60d049d9630aef02.tar.xz |
Avoid explicit allocs in fxbarcode matrix classes.
Other cleanups:
Remove unused method.
Fold Init() into constructor.
Return span<> where possible.
Change-Id: Ie38d32efb6e63d86ae24e93684903a6dd900810f
Reviewed-on: https://pdfium-review.googlesource.com/36810
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxbarcode/common/BC_CommonBitMatrix.h')
-rw-r--r-- | fxbarcode/common/BC_CommonBitMatrix.h | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/fxbarcode/common/BC_CommonBitMatrix.h b/fxbarcode/common/BC_CommonBitMatrix.h index 67c0f888cc..51c3728a7a 100644 --- a/fxbarcode/common/BC_CommonBitMatrix.h +++ b/fxbarcode/common/BC_CommonBitMatrix.h @@ -7,7 +7,7 @@ #ifndef FXBARCODE_COMMON_BC_COMMONBITMATRIX_H_ #define FXBARCODE_COMMON_BC_COMMONBITMATRIX_H_ -#include <memory> +#include <vector> #include "core/fxcrt/fx_system.h" @@ -31,13 +31,12 @@ class CBC_CommonBitMatrix { void SetCol(int32_t y, CBC_CommonBitArray* col); int32_t GetWidth() const { return m_width; } int32_t GetHeight() const { return m_height; } - int32_t* GetBits() const { return m_bits; } private: int32_t m_width = 0; int32_t m_height = 0; int32_t m_rowSize = 0; - int32_t* m_bits = nullptr; + std::vector<int32_t> m_bits; }; #endif // FXBARCODE_COMMON_BC_COMMONBITMATRIX_H_ |