diff options
author | Tom Sepez <tsepez@chromium.org> | 2018-10-03 20:23:21 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-10-03 20:23:21 +0000 |
commit | d0b6de7a98df3ee10c6acb53ca7566a090aa7385 (patch) | |
tree | 2ea37b606bc86306ade56e103c7b6924b3372c15 | |
parent | 36eca6325238aca03234d2576c64c9ff4bb5b010 (diff) | |
download | pdfium-d0b6de7a98df3ee10c6acb53ca7566a090aa7385.tar.xz |
Tidy CFX_UTF8Decoder.
Remove unused method, make ctor/dtor out-of-line.
Change-Id: I77bb7c1da8e9d369085072639ca388247f2b9225
Reviewed-on: https://pdfium-review.googlesource.com/c/43455
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
-rw-r--r-- | core/fxcrt/cfx_utf8decoder.cpp | 7 | ||||
-rw-r--r-- | core/fxcrt/cfx_utf8decoder.h | 8 |
2 files changed, 7 insertions, 8 deletions
diff --git a/core/fxcrt/cfx_utf8decoder.cpp b/core/fxcrt/cfx_utf8decoder.cpp index 8adab5c602..68ea30ac23 100644 --- a/core/fxcrt/cfx_utf8decoder.cpp +++ b/core/fxcrt/cfx_utf8decoder.cpp @@ -6,10 +6,9 @@ #include "core/fxcrt/cfx_utf8decoder.h" -void CFX_UTF8Decoder::Clear() { - m_Buffer.Clear(); - m_PendingBytes = 0; -} +CFX_UTF8Decoder::CFX_UTF8Decoder() = default; + +CFX_UTF8Decoder::~CFX_UTF8Decoder() = default; void CFX_UTF8Decoder::AppendCodePoint(uint32_t ch) { m_Buffer.AppendChar(static_cast<wchar_t>(ch)); diff --git a/core/fxcrt/cfx_utf8decoder.h b/core/fxcrt/cfx_utf8decoder.h index 1cafbe4472..a236aac63c 100644 --- a/core/fxcrt/cfx_utf8decoder.h +++ b/core/fxcrt/cfx_utf8decoder.h @@ -11,17 +11,17 @@ class CFX_UTF8Decoder { public: - CFX_UTF8Decoder() { m_PendingBytes = 0; } + CFX_UTF8Decoder(); + ~CFX_UTF8Decoder(); - void Clear(); void Input(uint8_t byte); void AppendCodePoint(uint32_t ch); void ClearStatus() { m_PendingBytes = 0; } WideStringView GetResult() const { return m_Buffer.AsStringView(); } private: - int m_PendingBytes; - uint32_t m_PendingChar; + int m_PendingBytes = 0; + uint32_t m_PendingChar = 0; CFX_WideTextBuf m_Buffer; }; |