Tidy CPWL_Edit:m_nCharset.

It always has a value in the 0..255 range per the constants in
fx_codepage.h, so remove an unreachable < 0 comparison and pack
tighter.

Change-Id: Id0376931b1f493337f76f63ea35e3cc0bf5d9e28
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/79270
Commit-Queue: Tom Sepez <tsepez@chromium.org>
Reviewed-by: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/pwl/cpwl_edit.cpp b/fpdfsdk/pwl/cpwl_edit.cpp
index 4069ba8..550bab1 100644
--- a/fpdfsdk/pwl/cpwl_edit.cpp
+++ b/fpdfsdk/pwl/cpwl_edit.cpp
@@ -854,10 +854,6 @@
   return CanRedo() && m_pEdit->Redo();
 }
 
-int32_t CPWL_Edit::GetCharSet() const {
-  return m_nCharSet < 0 ? FX_CHARSET_Default : m_nCharSet;
-}
-
 void CPWL_Edit::SetReadyToInput() {
   if (m_bMouseDown) {
     ReleaseCapture();
diff --git a/fpdfsdk/pwl/cpwl_edit.h b/fpdfsdk/pwl/cpwl_edit.h
index f0d21aa..48c7590 100644
--- a/fpdfsdk/pwl/cpwl_edit.h
+++ b/fpdfsdk/pwl/cpwl_edit.h
@@ -76,7 +76,7 @@
   void SetScrollPos(const CFX_PointF& point);
 
   void SetCharSet(uint8_t nCharSet) { m_nCharSet = nCharSet; }
-  int32_t GetCharSet() const;
+  uint8_t GetCharSet() const { return m_nCharSet; }
 
   void SetReadyToInput();
   void SetAlignFormatVerticalCenter();
@@ -130,7 +130,7 @@
 
   bool m_bMouseDown = false;
   bool m_bFocus = false;
-  int32_t m_nCharSet = FX_CHARSET_Default;
+  uint8_t m_nCharSet = FX_CHARSET_Default;
   CFX_FloatRect m_rcOldWindow;
   std::unique_ptr<CPWL_EditImpl> const m_pEdit;
   UnownedPtr<CPWL_Caret> m_pEditCaret;