summaryrefslogtreecommitdiff
path: root/fxbarcode
diff options
context:
space:
mode:
Diffstat (limited to 'fxbarcode')
-rw-r--r--fxbarcode/datamatrix/BC_DataMatrixWriter.cpp2
-rw-r--r--fxbarcode/datamatrix/BC_EncoderContext.cpp2
-rw-r--r--fxbarcode/datamatrix/BC_SymbolInfo.cpp22
-rw-r--r--fxbarcode/datamatrix/BC_SymbolInfo.h9
4 files changed, 3 insertions, 32 deletions
diff --git a/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp b/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
index 0177053941..19b6346f0a 100644
--- a/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
+++ b/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
@@ -123,7 +123,7 @@ uint8_t* CBC_DataMatrixWriter::Encode(const CFX_WideString& contents,
if (e != BCExceptionNO)
return nullptr;
CBC_SymbolInfo* symbolInfo =
- CBC_SymbolInfo::lookup(encoded.GetLength(), shape, true, e);
+ CBC_SymbolInfo::lookup(encoded.GetLength(), shape, e);
if (e != BCExceptionNO)
return nullptr;
CFX_WideString codewords =
diff --git a/fxbarcode/datamatrix/BC_EncoderContext.cpp b/fxbarcode/datamatrix/BC_EncoderContext.cpp
index b4719656b2..1c39be1aec 100644
--- a/fxbarcode/datamatrix/BC_EncoderContext.cpp
+++ b/fxbarcode/datamatrix/BC_EncoderContext.cpp
@@ -91,7 +91,7 @@ void CBC_EncoderContext::updateSymbolInfo(int32_t& e) {
}
void CBC_EncoderContext::updateSymbolInfo(int32_t len, int32_t& e) {
if (!m_symbolInfo || len > m_symbolInfo->dataCapacity()) {
- m_symbolInfo = CBC_SymbolInfo::lookup(len, m_shape, true, e);
+ m_symbolInfo = CBC_SymbolInfo::lookup(len, m_shape, e);
if (e != BCExceptionNO)
return;
}
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;
}
diff --git a/fxbarcode/datamatrix/BC_SymbolInfo.h b/fxbarcode/datamatrix/BC_SymbolInfo.h
index 7b536eccc7..55046f8fbe 100644
--- a/fxbarcode/datamatrix/BC_SymbolInfo.h
+++ b/fxbarcode/datamatrix/BC_SymbolInfo.h
@@ -23,18 +23,9 @@ class CBC_SymbolInfo {
static void Initialize();
static void Finalize();
static void overrideSymbolSet(CBC_SymbolInfo* override);
- static CBC_SymbolInfo* lookup(int32_t dataCodewords, int32_t& e);
static CBC_SymbolInfo* lookup(int32_t dataCodewords,
SymbolShapeHint shape,
int32_t& e);
- static CBC_SymbolInfo* lookup(int32_t dataCodewords,
- bool allowRectangular,
- bool fail,
- int32_t& e);
- static CBC_SymbolInfo* lookup(int32_t dataCodewords,
- SymbolShapeHint shape,
- bool fail,
- int32_t& e);
int32_t getSymbolDataWidth() const;
int32_t getSymbolDataHeight() const;