diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2017-03-13 16:43:37 -0400 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2017-03-14 14:14:51 +0000 |
commit | 812e96c2b4c5908a1979da5e27cdcecda0d1dfc9 (patch) | |
tree | f0b0607f6b757eb22237527215094bd87b5d03ba /core/fxcrt/fx_basic_buffer.cpp | |
parent | 893822aa5b6254591f8e80fbffcbb4fa6ad849aa (diff) | |
download | pdfium-812e96c2b4c5908a1979da5e27cdcecda0d1dfc9.tar.xz |
Replace FX_CHAR and FX_WCHAR with underlying types.
Change-Id: I96e0a20d66b9184d22f64d8e4ce0dadd5a78c1e8
Reviewed-on: https://pdfium-review.googlesource.com/2967
Commit-Queue: dsinclair <dsinclair@chromium.org>
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fxcrt/fx_basic_buffer.cpp')
-rw-r--r-- | core/fxcrt/fx_basic_buffer.cpp | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/core/fxcrt/fx_basic_buffer.cpp b/core/fxcrt/fx_basic_buffer.cpp index 14a85c2ee5..eaa79c9af1 100644 --- a/core/fxcrt/fx_basic_buffer.cpp +++ b/core/fxcrt/fx_basic_buffer.cpp @@ -127,19 +127,19 @@ CFX_ByteTextBuf& CFX_ByteTextBuf::operator<<(const CFX_ByteTextBuf& buf) { return *this; } -void CFX_WideTextBuf::AppendChar(FX_WCHAR ch) { - ExpandBuf(sizeof(FX_WCHAR)); - *(FX_WCHAR*)(m_pBuffer.get() + m_DataSize) = ch; - m_DataSize += sizeof(FX_WCHAR); +void CFX_WideTextBuf::AppendChar(wchar_t ch) { + ExpandBuf(sizeof(wchar_t)); + *(wchar_t*)(m_pBuffer.get() + m_DataSize) = ch; + m_DataSize += sizeof(wchar_t); } CFX_WideTextBuf& CFX_WideTextBuf::operator<<(const CFX_WideStringC& str) { - AppendBlock(str.c_str(), str.GetLength() * sizeof(FX_WCHAR)); + AppendBlock(str.c_str(), str.GetLength() * sizeof(wchar_t)); return *this; } CFX_WideTextBuf& CFX_WideTextBuf::operator<<(const CFX_WideString& str) { - AppendBlock(str.c_str(), str.GetLength() * sizeof(FX_WCHAR)); + AppendBlock(str.c_str(), str.GetLength() * sizeof(wchar_t)); return *this; } @@ -147,29 +147,29 @@ CFX_WideTextBuf& CFX_WideTextBuf::operator<<(int i) { char buf[32]; FXSYS_itoa(i, buf, 10); FX_STRSIZE len = FXSYS_strlen(buf); - ExpandBuf(len * sizeof(FX_WCHAR)); - FX_WCHAR* str = (FX_WCHAR*)(m_pBuffer.get() + m_DataSize); + ExpandBuf(len * sizeof(wchar_t)); + wchar_t* str = (wchar_t*)(m_pBuffer.get() + m_DataSize); for (FX_STRSIZE j = 0; j < len; j++) { *str++ = buf[j]; } - m_DataSize += len * sizeof(FX_WCHAR); + m_DataSize += len * sizeof(wchar_t); return *this; } CFX_WideTextBuf& CFX_WideTextBuf::operator<<(double f) { char buf[32]; FX_STRSIZE len = FX_ftoa((FX_FLOAT)f, buf); - ExpandBuf(len * sizeof(FX_WCHAR)); - FX_WCHAR* str = (FX_WCHAR*)(m_pBuffer.get() + m_DataSize); + ExpandBuf(len * sizeof(wchar_t)); + wchar_t* str = (wchar_t*)(m_pBuffer.get() + m_DataSize); for (FX_STRSIZE i = 0; i < len; i++) { *str++ = buf[i]; } - m_DataSize += len * sizeof(FX_WCHAR); + m_DataSize += len * sizeof(wchar_t); return *this; } -CFX_WideTextBuf& CFX_WideTextBuf::operator<<(const FX_WCHAR* lpsz) { - AppendBlock(lpsz, FXSYS_wcslen(lpsz) * sizeof(FX_WCHAR)); +CFX_WideTextBuf& CFX_WideTextBuf::operator<<(const wchar_t* lpsz) { + AppendBlock(lpsz, FXSYS_wcslen(lpsz) * sizeof(wchar_t)); return *this; } |