Remove CBC_HighLevelEncoder::isSpecialB256().

It just returns false. Also make more CBC_HighLevelEncoder members
const.

Change-Id: I0236e84db0d8b5e5fa1a99ebc4a809770a332471
Reviewed-on: https://pdfium-review.googlesource.com/5739
Commit-Queue: Lei Zhang <thestig@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
diff --git a/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp b/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
index cc85c83..93f2030 100644
--- a/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
+++ b/fxbarcode/datamatrix/BC_HighLevelEncoder.cpp
@@ -41,19 +41,19 @@
 #include "fxbarcode/utils.h"
 #include "third_party/base/ptr_util.h"
 
-wchar_t CBC_HighLevelEncoder::LATCH_TO_C40 = 230;
-wchar_t CBC_HighLevelEncoder::LATCH_TO_BASE256 = 231;
-wchar_t CBC_HighLevelEncoder::UPPER_SHIFT = 235;
-wchar_t CBC_HighLevelEncoder::LATCH_TO_ANSIX12 = 238;
-wchar_t CBC_HighLevelEncoder::LATCH_TO_TEXT = 239;
-wchar_t CBC_HighLevelEncoder::LATCH_TO_EDIFACT = 240;
-wchar_t CBC_HighLevelEncoder::C40_UNLATCH = 254;
-wchar_t CBC_HighLevelEncoder::X12_UNLATCH = 254;
-wchar_t CBC_HighLevelEncoder::PAD = 129;
-wchar_t CBC_HighLevelEncoder::MACRO_05 = 236;
-wchar_t CBC_HighLevelEncoder::MACRO_06 = 237;
-const wchar_t* CBC_HighLevelEncoder::MACRO_05_HEADER = L"[)>05";
-const wchar_t* CBC_HighLevelEncoder::MACRO_06_HEADER = L"[)>06";
+const wchar_t CBC_HighLevelEncoder::LATCH_TO_C40 = 230;
+const wchar_t CBC_HighLevelEncoder::LATCH_TO_BASE256 = 231;
+const wchar_t CBC_HighLevelEncoder::UPPER_SHIFT = 235;
+const wchar_t CBC_HighLevelEncoder::LATCH_TO_ANSIX12 = 238;
+const wchar_t CBC_HighLevelEncoder::LATCH_TO_TEXT = 239;
+const wchar_t CBC_HighLevelEncoder::LATCH_TO_EDIFACT = 240;
+const wchar_t CBC_HighLevelEncoder::C40_UNLATCH = 254;
+const wchar_t CBC_HighLevelEncoder::X12_UNLATCH = 254;
+const wchar_t CBC_HighLevelEncoder::PAD = 129;
+const wchar_t CBC_HighLevelEncoder::MACRO_05 = 236;
+const wchar_t CBC_HighLevelEncoder::MACRO_06 = 237;
+const wchar_t CBC_HighLevelEncoder::MACRO_05_HEADER[] = L"[)>05";
+const wchar_t CBC_HighLevelEncoder::MACRO_06_HEADER[] = L"[)>06";
 const wchar_t CBC_HighLevelEncoder::MACRO_TRAILER = 0x0004;
 
 CBC_HighLevelEncoder::CBC_HighLevelEncoder() {}
@@ -217,11 +217,7 @@
     } else {
       charCounts[EDIFACT_ENCODATION] += 13.0f / 4.0f;
     }
-    if (isSpecialB256(c)) {
-      charCounts[BASE256_ENCODATION] += 4;
-    } else {
-      charCounts[BASE256_ENCODATION]++;
-    }
+    charCounts[BASE256_ENCODATION]++;
     if (charsProcessed >= 4) {
       std::vector<int32_t> intCharCounts(6);
       std::vector<uint8_t> mins(6);
@@ -350,6 +346,3 @@
 bool CBC_HighLevelEncoder::isNativeEDIFACT(wchar_t ch) {
   return ch >= ' ' && ch <= '^';
 }
-bool CBC_HighLevelEncoder::isSpecialB256(wchar_t ch) {
-  return false;
-}
diff --git a/fxbarcode/datamatrix/BC_HighLevelEncoder.h b/fxbarcode/datamatrix/BC_HighLevelEncoder.h
index 6f0db29..46789d6 100644
--- a/fxbarcode/datamatrix/BC_HighLevelEncoder.h
+++ b/fxbarcode/datamatrix/BC_HighLevelEncoder.h
@@ -40,24 +40,14 @@
   static int32_t determineConsecutiveDigitCount(CFX_WideString msg,
                                                 int32_t startpos);
 
- public:
-  static wchar_t LATCH_TO_C40;
-  static wchar_t LATCH_TO_BASE256;
-  static wchar_t UPPER_SHIFT;
-  static wchar_t LATCH_TO_ANSIX12;
-  static wchar_t LATCH_TO_TEXT;
-  static wchar_t LATCH_TO_EDIFACT;
-  static wchar_t C40_UNLATCH;
-  static wchar_t X12_UNLATCH;
-
- private:
-  static wchar_t PAD;
-  static wchar_t MACRO_05;
-  static wchar_t MACRO_06;
-  static const wchar_t* MACRO_05_HEADER;
-  static const wchar_t* MACRO_06_HEADER;
-  static const wchar_t MACRO_TRAILER;
-  std::vector<uint8_t> m_bytearray;
+  static const wchar_t LATCH_TO_C40;
+  static const wchar_t LATCH_TO_BASE256;
+  static const wchar_t UPPER_SHIFT;
+  static const wchar_t LATCH_TO_ANSIX12;
+  static const wchar_t LATCH_TO_TEXT;
+  static const wchar_t LATCH_TO_EDIFACT;
+  static const wchar_t C40_UNLATCH;
+  static const wchar_t X12_UNLATCH;
 
  private:
   static wchar_t randomize253State(wchar_t ch, int32_t codewordPosition);
@@ -71,7 +61,15 @@
   static bool isNativeX12(wchar_t ch);
   static bool isX12TermSep(wchar_t ch);
   static bool isNativeEDIFACT(wchar_t ch);
-  static bool isSpecialB256(wchar_t ch);
+
+  static const wchar_t PAD;
+  static const wchar_t MACRO_05;
+  static const wchar_t MACRO_06;
+  static const wchar_t MACRO_05_HEADER[];
+  static const wchar_t MACRO_06_HEADER[];
+  static const wchar_t MACRO_TRAILER;
+
+  std::vector<uint8_t> m_bytearray;
 };
 
 #endif  // FXBARCODE_DATAMATRIX_BC_HIGHLEVELENCODER_H_