diff options
author | tsepez <tsepez@chromium.org> | 2016-04-14 13:42:44 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-14 13:42:44 -0700 |
commit | 8e4c505ff6d82263183e9f812fcc7b45c1414f15 (patch) | |
tree | 765e0f3a18f9ad60dde74431846d770fecdcdb37 /core/fxcrt/fx_basic_buffer.cpp | |
parent | 3bac505132235c009b4b79aa4ac238afad5366e8 (diff) | |
download | pdfium-8e4c505ff6d82263183e9f812fcc7b45c1414f15.tar.xz |
Rename CFX_ByteTextBuf::GetByteString() to AsStringC().
Do the same for CFX_WideTextBuf as well.
The name is confusing because these return CFX_ByteStringC,
not CFX_ByteString. The AsStringC naming gives parallelism with
the string types themselves, and may help to indicate that
the result is only good for the lifetime of the object being
operated upon.
Review URL: https://codereview.chromium.org/1886263003
Diffstat (limited to 'core/fxcrt/fx_basic_buffer.cpp')
-rw-r--r-- | core/fxcrt/fx_basic_buffer.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/fxcrt/fx_basic_buffer.cpp b/core/fxcrt/fx_basic_buffer.cpp index 1e5d0554d1..338edc16c9 100644 --- a/core/fxcrt/fx_basic_buffer.cpp +++ b/core/fxcrt/fx_basic_buffer.cpp @@ -100,7 +100,7 @@ void CFX_BinaryBuf::InsertBlock(FX_STRSIZE pos, m_DataSize += size; } -CFX_ByteStringC CFX_ByteTextBuf::GetByteString() const { +CFX_ByteStringC CFX_ByteTextBuf::AsStringC() const { return CFX_ByteStringC(m_pBuffer.get(), m_DataSize); } @@ -186,8 +186,8 @@ CFX_WideTextBuf& CFX_WideTextBuf::operator<<(const CFX_WideTextBuf& buf) { return *this; } -CFX_WideStringC CFX_WideTextBuf::GetWideString() const { - return CFX_WideStringC((const FX_WCHAR*)m_pBuffer.get(), +CFX_WideStringC CFX_WideTextBuf::AsStringC() const { + return CFX_WideStringC(reinterpret_cast<const FX_WCHAR*>(m_pBuffer.get()), m_DataSize / sizeof(FX_WCHAR)); } |