diff options
author | Henrique Nakashima <hnakashima@chromium.org> | 2017-08-15 15:59:04 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-08-15 20:40:41 +0000 |
commit | 6e524ad89eac22f0e5d5475652ec78c609b788e8 (patch) | |
tree | e431f75773757b1cbec0582d1ddf835cbeb7e237 /core | |
parent | bff66f1d8d74d3ea22b3b4da775588e07509f6ac (diff) | |
download | pdfium-6e524ad89eac22f0e5d5475652ec78c609b788e8.tar.xz |
Remove CFX_ByteTextBuf.
Bug: pdfium:731
Change-Id: I00d2097bca369aa4d1743716c4b2615e37a8444d
Reviewed-on: https://pdfium-review.googlesource.com/10910
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Henrique Nakashima <hnakashima@chromium.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/fxcrt/fx_basic.h | 24 | ||||
-rw-r--r-- | core/fxcrt/fx_basic_buffer.cpp | 31 |
2 files changed, 0 insertions, 55 deletions
diff --git a/core/fxcrt/fx_basic.h b/core/fxcrt/fx_basic.h index db0072a5ac..47cce9a60f 100644 --- a/core/fxcrt/fx_basic.h +++ b/core/fxcrt/fx_basic.h @@ -57,30 +57,6 @@ class CFX_BinaryBuf { std::unique_ptr<uint8_t, FxFreeDeleter> m_pBuffer; }; -class CFX_ByteTextBuf : public CFX_BinaryBuf { - public: - FX_STRSIZE GetLength() const { return m_DataSize; } - CFX_ByteString MakeString() const { - return CFX_ByteString(m_pBuffer.get(), m_DataSize); - } - CFX_ByteStringC AsStringC() const { - return CFX_ByteStringC(m_pBuffer.get(), m_DataSize); - } - - void AppendChar(int ch) { AppendByte(static_cast<uint8_t>(ch)); } - CFX_ByteTextBuf& operator<<(int i); - CFX_ByteTextBuf& operator<<(uint32_t i); - CFX_ByteTextBuf& operator<<(double f); - CFX_ByteTextBuf& operator<<(const char* pStr) { - return *this << CFX_ByteStringC(pStr); - } - CFX_ByteTextBuf& operator<<(const CFX_ByteString& str) { - return *this << str.AsStringC(); - } - CFX_ByteTextBuf& operator<<(const CFX_ByteStringC& lpsz); - CFX_ByteTextBuf& operator<<(const CFX_ByteTextBuf& buf); -}; - class CFX_WideTextBuf : public CFX_BinaryBuf { public: void AppendChar(wchar_t wch); diff --git a/core/fxcrt/fx_basic_buffer.cpp b/core/fxcrt/fx_basic_buffer.cpp index bcf0570d32..a359bdd5d0 100644 --- a/core/fxcrt/fx_basic_buffer.cpp +++ b/core/fxcrt/fx_basic_buffer.cpp @@ -95,37 +95,6 @@ void CFX_BinaryBuf::InsertBlock(FX_STRSIZE pos, m_DataSize += size; } -CFX_ByteTextBuf& CFX_ByteTextBuf::operator<<(const CFX_ByteStringC& lpsz) { - AppendBlock(lpsz.raw_str(), lpsz.GetLength()); - return *this; -} - -CFX_ByteTextBuf& CFX_ByteTextBuf::operator<<(int i) { - char buf[32]; - FXSYS_itoa(i, buf, 10); - AppendBlock(buf, FXSYS_strlen(buf)); - return *this; -} - -CFX_ByteTextBuf& CFX_ByteTextBuf::operator<<(uint32_t i) { - char buf[32]; - FXSYS_itoa(i, buf, 10); - AppendBlock(buf, FXSYS_strlen(buf)); - return *this; -} - -CFX_ByteTextBuf& CFX_ByteTextBuf::operator<<(double f) { - char buf[32]; - FX_STRSIZE len = FX_ftoa((float)f, buf); - AppendBlock(buf, len); - return *this; -} - -CFX_ByteTextBuf& CFX_ByteTextBuf::operator<<(const CFX_ByteTextBuf& buf) { - AppendBlock(buf.m_pBuffer.get(), buf.m_DataSize); - return *this; -} - void CFX_WideTextBuf::AppendChar(wchar_t ch) { ExpandBuf(sizeof(wchar_t)); *(wchar_t*)(m_pBuffer.get() + m_DataSize) = ch; |