summaryrefslogtreecommitdiff
path: root/core/fxcrt/fx_basic_wstring.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2016-04-06 06:27:29 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-06 06:27:29 -0700
commit660956f58af305d72c64bb87c05f694469846df2 (patch)
tree5a73d1df3512213bcecb28114f9d51cec86fca0d /core/fxcrt/fx_basic_wstring.cpp
parent54750b570d32898c8ebd4fa59105bfd3b96043af (diff)
downloadpdfium-660956f58af305d72c64bb87c05f694469846df2.tar.xz
Rename CFX_WideStringC::raw_str() to c_str()
No functional change intended. This difference in naming is standing in the way of consolidating some of the string code between Wide and Byte strings. The Wide code wants to call raw_str() in exactly the same spots that the Byte code calls c_str(). This makes sense, because in both places we get a character type back, and not a uint*_t type. If WideStringC had a raw_str() method, it would have to return uint32_t or similar. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1863593004
Diffstat (limited to 'core/fxcrt/fx_basic_wstring.cpp')
-rw-r--r--core/fxcrt/fx_basic_wstring.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/core/fxcrt/fx_basic_wstring.cpp b/core/fxcrt/fx_basic_wstring.cpp
index 8940c1a37f..cd60036acd 100644
--- a/core/fxcrt/fx_basic_wstring.cpp
+++ b/core/fxcrt/fx_basic_wstring.cpp
@@ -103,7 +103,7 @@ CFX_WideString::CFX_WideString(const CFX_WideStringC& str) {
}
m_pData = StringData::Create(str.GetLength());
if (m_pData) {
- FXSYS_memcpy(m_pData->m_String, str.raw_str(),
+ FXSYS_memcpy(m_pData->m_String, str.c_str(),
str.GetLength() * sizeof(FX_WCHAR));
}
}
@@ -116,9 +116,9 @@ CFX_WideString::CFX_WideString(const CFX_WideStringC& str1,
}
m_pData = StringData::Create(nNewLen);
if (m_pData) {
- FXSYS_memcpy(m_pData->m_String, str1.raw_str(),
+ FXSYS_memcpy(m_pData->m_String, str1.c_str(),
str1.GetLength() * sizeof(FX_WCHAR));
- FXSYS_memcpy(m_pData->m_String + str1.GetLength(), str2.raw_str(),
+ FXSYS_memcpy(m_pData->m_String + str1.GetLength(), str2.c_str(),
str2.GetLength() * sizeof(FX_WCHAR));
}
}
@@ -151,7 +151,7 @@ const CFX_WideString& CFX_WideString::operator=(
if (stringSrc.IsEmpty()) {
Empty();
} else {
- AssignCopy(stringSrc.GetLength(), stringSrc.raw_str());
+ AssignCopy(stringSrc.GetLength(), stringSrc.c_str());
}
return *this;
}
@@ -195,7 +195,7 @@ const CFX_WideString& CFX_WideString::operator+=(const CFX_WideStringC& str) {
if (str.IsEmpty()) {
return *this;
}
- ConcatInPlace(str.GetLength(), str.raw_str());
+ ConcatInPlace(str.GetLength(), str.c_str());
return *this;
}
bool CFX_WideString::operator==(const wchar_t* ptr) const {
@@ -213,7 +213,7 @@ bool CFX_WideString::operator==(const CFX_WideStringC& str) const {
return str.IsEmpty();
return str.GetLength() == m_pData->m_nDataLength &&
- wmemcmp(str.raw_str(), m_pData->m_String, m_pData->m_nDataLength) == 0;
+ wmemcmp(str.c_str(), m_pData->m_String, m_pData->m_nDataLength) == 0;
}
bool CFX_WideString::operator==(const CFX_WideString& other) const {
if (IsEmpty())