summaryrefslogtreecommitdiff
path: root/fxbarcode/common/BC_CommonBitMatrix.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-01 14:06:10 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-02 13:59:36 +0000
commit0804b3f5114ff09df9b10207997e1f16c868b45e (patch)
tree59c6a06f89fe78ccab51b954386a03d8d7625aa2 /fxbarcode/common/BC_CommonBitMatrix.cpp
parent40baddef7fda756c29b813dc1fd67b28d745aa8c (diff)
downloadpdfium-0804b3f5114ff09df9b10207997e1f16c868b45e.tar.xz
Remove more |new|s, part 7
Remove some dead code along the way. Move some getters to headers and make const. Change-Id: I14280c247b0cfeff8ad7f606302bc8bba1960f1e Reviewed-on: https://pdfium-review.googlesource.com/4730 Commit-Queue: dsinclair <dsinclair@chromium.org> Reviewed-by: dsinclair <dsinclair@chromium.org>
Diffstat (limited to 'fxbarcode/common/BC_CommonBitMatrix.cpp')
-rw-r--r--fxbarcode/common/BC_CommonBitMatrix.cpp32
1 files changed, 3 insertions, 29 deletions
diff --git a/fxbarcode/common/BC_CommonBitMatrix.cpp b/fxbarcode/common/BC_CommonBitMatrix.cpp
index fe3546156e..6fe447db6f 100644
--- a/fxbarcode/common/BC_CommonBitMatrix.cpp
+++ b/fxbarcode/common/BC_CommonBitMatrix.cpp
@@ -20,9 +20,11 @@
* limitations under the License.
*/
-#include "fxbarcode/common/BC_CommonBitArray.h"
#include "fxbarcode/common/BC_CommonBitMatrix.h"
+
+#include "fxbarcode/common/BC_CommonBitArray.h"
#include "fxbarcode/utils.h"
+#include "third_party/base/ptr_util.h"
CBC_CommonBitMatrix::CBC_CommonBitMatrix() {}
@@ -55,10 +57,6 @@ bool CBC_CommonBitMatrix::Get(int32_t x, int32_t y) const {
return ((((uint32_t)m_bits[offset]) >> (x & 0x1f)) & 1) != 0;
}
-int32_t* CBC_CommonBitMatrix::GetBits() {
- return m_bits;
-}
-
void CBC_CommonBitMatrix::Set(int32_t x, int32_t y) {
int32_t offset = y * m_rowSize + (x >> 5);
if (offset >= m_rowSize * m_height || offset < 0)
@@ -95,20 +93,6 @@ bool CBC_CommonBitMatrix::SetRegion(int32_t left,
return true;
}
-CBC_CommonBitArray* CBC_CommonBitMatrix::GetRow(int32_t y,
- CBC_CommonBitArray* row) {
- CBC_CommonBitArray* rowArray = nullptr;
- if (!row || static_cast<int32_t>(row->GetSize()) < m_width) {
- rowArray = new CBC_CommonBitArray(m_width);
- } else {
- rowArray = new CBC_CommonBitArray(row);
- }
- int32_t offset = y * m_rowSize;
- for (int32_t x = 0; x < m_rowSize; x++)
- rowArray->SetBulk(x << 5, m_bits[offset + x]);
- return rowArray;
-}
-
void CBC_CommonBitMatrix::SetRow(int32_t y, CBC_CommonBitArray* row) {
int32_t l = y * m_rowSize;
for (int32_t i = 0; i < m_rowSize; i++) {
@@ -121,13 +105,3 @@ void CBC_CommonBitMatrix::SetCol(int32_t y, CBC_CommonBitArray* col) {
for (size_t i = 0; i < col->GetBits().size(); ++i)
m_bits[i * m_rowSize + y] = col->GetBitArray()[i];
}
-
-int32_t CBC_CommonBitMatrix::GetWidth() const {
- return m_width;
-}
-int32_t CBC_CommonBitMatrix::GetHeight() const {
- return m_height;
-}
-int32_t CBC_CommonBitMatrix::GetRowSize() const {
- return m_rowSize;
-}