From 8e4c505ff6d82263183e9f812fcc7b45c1414f15 Mon Sep 17 00:00:00 2001 From: tsepez Date: Thu, 14 Apr 2016 13:42:44 -0700 Subject: 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 --- core/fxcrt/include/fx_basic.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'core/fxcrt/include') diff --git a/core/fxcrt/include/fx_basic.h b/core/fxcrt/include/fx_basic.h index 1b64a5924f..5a577c2e54 100644 --- a/core/fxcrt/include/fx_basic.h +++ b/core/fxcrt/include/fx_basic.h @@ -58,7 +58,7 @@ class CFX_ByteTextBuf : public CFX_BinaryBuf { public: void AppendChar(int ch) { AppendByte((uint8_t)ch); } FX_STRSIZE GetLength() const { return m_DataSize; } - CFX_ByteStringC GetByteString() const; + CFX_ByteStringC AsStringC() const; CFX_ByteTextBuf& operator<<(int i); CFX_ByteTextBuf& operator<<(uint32_t i); @@ -80,7 +80,7 @@ class CFX_WideTextBuf : public CFX_BinaryBuf { FX_WCHAR* GetBuffer() const { return reinterpret_cast(m_pBuffer.get()); } - CFX_WideStringC GetWideString() const; + CFX_WideStringC AsStringC() const; void Delete(int start_index, int count) { CFX_BinaryBuf::Delete(start_index * sizeof(FX_WCHAR), @@ -206,7 +206,7 @@ class CFX_UTF8Decoder { void ClearStatus() { m_PendingBytes = 0; } - CFX_WideStringC GetResult() const { return m_Buffer.GetWideString(); } + CFX_WideStringC GetResult() const { return m_Buffer.AsStringC(); } protected: int m_PendingBytes; @@ -222,7 +222,7 @@ class CFX_UTF8Encoder { void Input(FX_WCHAR unicode); void AppendStr(const CFX_ByteStringC& str) { m_Buffer << str; } - CFX_ByteStringC GetResult() const { return m_Buffer.GetByteString(); } + CFX_ByteStringC GetResult() const { return m_Buffer.AsStringC(); } protected: CFX_ByteTextBuf m_Buffer; -- cgit v1.2.3