summaryrefslogtreecommitdiff
path: root/fxbarcode/datamatrix/BC_SymbolInfo.cpp
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2017-05-24 00:52:54 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-24 17:30:29 +0000
commite86d2f1acbd1e1d1ddae1a105b7c87f17b643f62 (patch)
tree8db3ad8176129a14c93930f0dbb4e94cd8779ac4 /fxbarcode/datamatrix/BC_SymbolInfo.cpp
parent08f4b7762a4453818c76c680f5295986e21418ce (diff)
downloadpdfium-e86d2f1acbd1e1d1ddae1a105b7c87f17b643f62.tar.xz
Cleanup CBC_SymbolInfo::lookup().
Remove unused variants and simplify the one remaining variant. Change-Id: I9b6e596b479f95319a3b69f5db2c4d1b2cff4ebf Reviewed-on: https://pdfium-review.googlesource.com/5834 Reviewed-by: Tom Sepez <tsepez@chromium.org> Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'fxbarcode/datamatrix/BC_SymbolInfo.cpp')
-rw-r--r--fxbarcode/datamatrix/BC_SymbolInfo.cpp22
1 files changed, 1 insertions, 21 deletions
diff --git a/fxbarcode/datamatrix/BC_SymbolInfo.cpp b/fxbarcode/datamatrix/BC_SymbolInfo.cpp
index 1d5a84f5c4..ac4815a71f 100644
--- a/fxbarcode/datamatrix/BC_SymbolInfo.cpp
+++ b/fxbarcode/datamatrix/BC_SymbolInfo.cpp
@@ -111,27 +111,8 @@ CBC_SymbolInfo::CBC_SymbolInfo(int32_t dataCapacity,
CBC_SymbolInfo::~CBC_SymbolInfo() {}
-CBC_SymbolInfo* CBC_SymbolInfo::lookup(int32_t dataCodewords, int32_t& e) {
- return lookup(dataCodewords, FORCE_NONE, true, e);
-}
-
-CBC_SymbolInfo* CBC_SymbolInfo::lookup(int32_t dataCodewords,
- SymbolShapeHint shape,
- int32_t& e) {
- return lookup(dataCodewords, shape, true, e);
-}
-
-CBC_SymbolInfo* CBC_SymbolInfo::lookup(int32_t dataCodewords,
- bool allowRectangular,
- bool fail,
- int32_t& e) {
- SymbolShapeHint shape = allowRectangular ? FORCE_NONE : FORCE_SQUARE;
- return lookup(dataCodewords, shape, fail, e);
-}
-
CBC_SymbolInfo* CBC_SymbolInfo::lookup(int32_t dataCodewords,
SymbolShapeHint shape,
- bool fail,
int32_t& e) {
for (size_t i = 0; i < kSymbolsCount; i++) {
CBC_SymbolInfo* symbol = g_symbols[i];
@@ -142,8 +123,7 @@ CBC_SymbolInfo* CBC_SymbolInfo::lookup(int32_t dataCodewords,
if (dataCodewords <= symbol->dataCapacity())
return symbol;
}
- if (fail)
- e = BCExceptionIllegalDataCodewords;
+ e = BCExceptionIllegalDataCodewords;
return nullptr;
}