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>
diff --git a/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp b/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
index 0177053..19b6346 100644
--- a/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
+++ b/fxbarcode/datamatrix/BC_DataMatrixWriter.cpp
@@ -123,7 +123,7 @@
   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 b471965..1c39be1 100644
--- a/fxbarcode/datamatrix/BC_EncoderContext.cpp
+++ b/fxbarcode/datamatrix/BC_EncoderContext.cpp
@@ -91,7 +91,7 @@
 }
 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 1d5a84f..ac4815a 100644
--- a/fxbarcode/datamatrix/BC_SymbolInfo.cpp
+++ b/fxbarcode/datamatrix/BC_SymbolInfo.cpp
@@ -111,28 +111,9 @@
 
 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];
     if ((shape == FORCE_SQUARE && symbol->m_rectangular) ||
@@ -142,8 +123,7 @@
     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 7b536ec..55046f8 100644
--- a/fxbarcode/datamatrix/BC_SymbolInfo.h
+++ b/fxbarcode/datamatrix/BC_SymbolInfo.h
@@ -23,18 +23,9 @@
   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;