summaryrefslogtreecommitdiff
path: root/fxbarcode/datamatrix/BC_SymbolInfo.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-05-25 18:43:44 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-26 01:56:52 +0000
commit1bbcb35e4e5593998837c832eabf16a91a695387 (patch)
tree0e60ccf75924489907237e55fcd59c90d3be50e1 /fxbarcode/datamatrix/BC_SymbolInfo.cpp
parent1c26a6e477c5eaebf8aaca0c65a3a06c22e9c527 (diff)
downloadpdfium-1bbcb35e4e5593998837c832eabf16a91a695387.tar.xz
Replace SymbolShapeHint with a boolean.
Delete BC_SymbolShapeHint.h since there is nothing left in it. Change-Id: Ic991064cd396f224966e5f3e8537fc62b5a9908a Reviewed-on: https://pdfium-review.googlesource.com/5835 Commit-Queue: Lei Zhang <thestig@chromium.org> Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'fxbarcode/datamatrix/BC_SymbolInfo.cpp')
-rw-r--r--fxbarcode/datamatrix/BC_SymbolInfo.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/fxbarcode/datamatrix/BC_SymbolInfo.cpp b/fxbarcode/datamatrix/BC_SymbolInfo.cpp
index ac4815a71f..f4d99d2e1c 100644
--- a/fxbarcode/datamatrix/BC_SymbolInfo.cpp
+++ b/fxbarcode/datamatrix/BC_SymbolInfo.cpp
@@ -25,7 +25,6 @@
#include "fxbarcode/common/BC_CommonBitMatrix.h"
#include "fxbarcode/datamatrix/BC_DataMatrixSymbolInfo144.h"
#include "fxbarcode/datamatrix/BC_Encoder.h"
-#include "fxbarcode/datamatrix/BC_SymbolShapeHint.h"
#include "fxbarcode/utils.h"
namespace {
@@ -112,14 +111,13 @@ CBC_SymbolInfo::CBC_SymbolInfo(int32_t dataCapacity,
CBC_SymbolInfo::~CBC_SymbolInfo() {}
CBC_SymbolInfo* CBC_SymbolInfo::lookup(int32_t dataCodewords,
- SymbolShapeHint shape,
+ bool allowRectangular,
int32_t& e) {
for (size_t i = 0; i < kSymbolsCount; i++) {
CBC_SymbolInfo* symbol = g_symbols[i];
- if ((shape == FORCE_SQUARE && symbol->m_rectangular) ||
- (shape == FORCE_RECTANGLE && !symbol->m_rectangular)) {
+ if (symbol->m_rectangular && !allowRectangular)
continue;
- }
+
if (dataCodewords <= symbol->dataCapacity())
return symbol;
}