summaryrefslogtreecommitdiff
path: root/fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp
diff options
context:
space:
mode:
authorHenrique Nakashima <hnakashima@chromium.org>2018-08-22 17:22:17 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-08-22 17:22:17 +0000
commitc47ba8ece5d73651dd966fd420ba00da2f9c6ad8 (patch)
treebfb0aa308aabd34f3c7f8697436d7b8e2b87304d /fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp
parent03fdf3a2b5ee0974be13a9594a897003df412306 (diff)
downloadpdfium-c47ba8ece5d73651dd966fd420ba00da2f9c6ad8.tar.xz
Remove unused setters in CBC_BarcodeMatrix and CBC_BarcodeRow.
Change-Id: I01c83d96f07eac776e8269b7d1e06b2b07ca75ea Reviewed-on: https://pdfium-review.googlesource.com/40932 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp')
-rw-r--r--fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp b/fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp
index c0c251f708..ee54a273dd 100644
--- a/fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp
+++ b/fxbarcode/pdf417/BC_PDF417BarcodeRow.cpp
@@ -22,22 +22,16 @@
#include "fxbarcode/pdf417/BC_PDF417BarcodeRow.h"
+#include <algorithm>
+
CBC_BarcodeRow::CBC_BarcodeRow(size_t width)
: m_row(width), m_currentLocation(0) {}
CBC_BarcodeRow::~CBC_BarcodeRow() {}
-void CBC_BarcodeRow::set(int32_t x, uint8_t value) {
- m_row[x] = value;
-}
-
-void CBC_BarcodeRow::set(int32_t x, bool black) {
- m_row[x] = black ? 1 : 0;
-}
-
void CBC_BarcodeRow::addBar(bool black, int32_t width) {
- for (int32_t ii = 0; ii < width; ii++)
- set(m_currentLocation++, black);
+ std::fill_n(m_row.begin() + m_currentLocation, width, black ? 1 : 0);
+ m_currentLocation += width;
}
std::vector<uint8_t>& CBC_BarcodeRow::getRow() {