Initialize some 1D barcode classes in the header.

Change-Id: Iaeb7f43e442ace403f1522268e63b1a59f223a9d
Reviewed-on: https://pdfium-review.googlesource.com/42599
Reviewed-by: Henrique Nakashima <hnakashima@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fxbarcode/oned/BC_OnedCodaBarWriter.cpp b/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
index c51b1c2..57e86a4 100644
--- a/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
+++ b/fxbarcode/oned/BC_OnedCodaBarWriter.cpp
@@ -49,10 +49,9 @@
 
 }  // namespace
 
-CBC_OnedCodaBarWriter::CBC_OnedCodaBarWriter()
-    : m_chStart('A'), m_chEnd('B'), m_iWideNarrRatio(2) {}
+CBC_OnedCodaBarWriter::CBC_OnedCodaBarWriter() = default;
 
-CBC_OnedCodaBarWriter::~CBC_OnedCodaBarWriter() {}
+CBC_OnedCodaBarWriter::~CBC_OnedCodaBarWriter() = default;
 
 bool CBC_OnedCodaBarWriter::SetStartChar(char start) {
   if (!pdfium::ContainsValue(kStartEndChars, start))
diff --git a/fxbarcode/oned/BC_OnedCodaBarWriter.h b/fxbarcode/oned/BC_OnedCodaBarWriter.h
index d3f5224..4b4f066 100644
--- a/fxbarcode/oned/BC_OnedCodaBarWriter.h
+++ b/fxbarcode/oned/BC_OnedCodaBarWriter.h
@@ -40,9 +40,9 @@
   WideString encodedContents(const WideStringView& contents);
 
  private:
-  char m_chStart;
-  char m_chEnd;
-  int8_t m_iWideNarrRatio;
+  char m_chStart = 'A';
+  char m_chEnd = 'B';
+  int8_t m_iWideNarrRatio = 2;
 };
 
 #endif  // FXBARCODE_ONED_BC_ONEDCODABARWRITER_H_
diff --git a/fxbarcode/oned/BC_OnedCode128Writer.cpp b/fxbarcode/oned/BC_OnedCode128Writer.cpp
index 034ffc3..ad94d29 100644
--- a/fxbarcode/oned/BC_OnedCode128Writer.cpp
+++ b/fxbarcode/oned/BC_OnedCode128Writer.cpp
@@ -81,7 +81,7 @@
   assert(m_codeFormat == BC_CODE128_B || m_codeFormat == BC_CODE128_C);
 }
 
-CBC_OnedCode128Writer::~CBC_OnedCode128Writer() {}
+CBC_OnedCode128Writer::~CBC_OnedCode128Writer() = default;
 
 bool CBC_OnedCode128Writer::CheckContentValidity(
     const WideStringView& contents) {
diff --git a/fxbarcode/oned/BC_OnedCode39Writer.cpp b/fxbarcode/oned/BC_OnedCode39Writer.cpp
index 9152155..c800250 100644
--- a/fxbarcode/oned/BC_OnedCode39Writer.cpp
+++ b/fxbarcode/oned/BC_OnedCode39Writer.cpp
@@ -52,9 +52,9 @@
 
 }  // namespace
 
-CBC_OnedCode39Writer::CBC_OnedCode39Writer() : m_iWideNarrRatio(3) {}
+CBC_OnedCode39Writer::CBC_OnedCode39Writer() = default;
 
-CBC_OnedCode39Writer::~CBC_OnedCode39Writer() {}
+CBC_OnedCode39Writer::~CBC_OnedCode39Writer() = default;
 
 bool CBC_OnedCode39Writer::CheckContentValidity(
     const WideStringView& contents) {
diff --git a/fxbarcode/oned/BC_OnedCode39Writer.h b/fxbarcode/oned/BC_OnedCode39Writer.h
index 5c4a4d5..0791062 100644
--- a/fxbarcode/oned/BC_OnedCode39Writer.h
+++ b/fxbarcode/oned/BC_OnedCode39Writer.h
@@ -38,7 +38,7 @@
   void ToIntArray(int16_t a, int8_t* toReturn);
   char CalcCheckSum(const ByteString& contents);
 
-  int8_t m_iWideNarrRatio;
+  int8_t m_iWideNarrRatio = 3;
 };
 
 #endif  // FXBARCODE_ONED_BC_ONEDCODE39WRITER_H_
diff --git a/fxbarcode/oned/BC_OnedEAN8Writer.cpp b/fxbarcode/oned/BC_OnedEAN8Writer.cpp
index b953c12..1ff96a0 100644
--- a/fxbarcode/oned/BC_OnedEAN8Writer.cpp
+++ b/fxbarcode/oned/BC_OnedEAN8Writer.cpp
@@ -46,10 +46,9 @@
 
 CBC_OnedEAN8Writer::CBC_OnedEAN8Writer() {
   m_iDataLenth = 8;
-  m_codeWidth = 3 + (7 * 4) + 5 + (7 * 4) + 3;
 }
 
-CBC_OnedEAN8Writer::~CBC_OnedEAN8Writer() {}
+CBC_OnedEAN8Writer::~CBC_OnedEAN8Writer() = default;
 
 void CBC_OnedEAN8Writer::SetDataLength(int32_t length) {
   m_iDataLenth = 8;
diff --git a/fxbarcode/oned/BC_OnedEAN8Writer.h b/fxbarcode/oned/BC_OnedEAN8Writer.h
index dfef89e..269156a 100644
--- a/fxbarcode/oned/BC_OnedEAN8Writer.h
+++ b/fxbarcode/oned/BC_OnedEAN8Writer.h
@@ -42,7 +42,8 @@
                  int32_t multiple) override;
 
  private:
-  int32_t m_codeWidth;
+  static constexpr int32_t kDefaultCodeWidth = 3 + (7 * 4) + 5 + (7 * 4) + 3;
+  int32_t m_codeWidth = kDefaultCodeWidth;
 };
 
 #endif  // FXBARCODE_ONED_BC_ONEDEAN8WRITER_H_