diff options
author | tsepez <tsepez@chromium.org> | 2016-04-06 06:27:29 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-04-06 06:27:29 -0700 |
commit | 660956f58af305d72c64bb87c05f694469846df2 (patch) | |
tree | 5a73d1df3512213bcecb28114f9d51cec86fca0d /core/fpdfdoc | |
parent | 54750b570d32898c8ebd4fa59105bfd3b96043af (diff) | |
download | pdfium-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/fpdfdoc')
-rw-r--r-- | core/fpdfdoc/doc_basic.cpp | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/core/fpdfdoc/doc_basic.cpp b/core/fpdfdoc/doc_basic.cpp index 2555d4839b..744475e505 100644 --- a/core/fpdfdoc/doc_basic.cpp +++ b/core/fpdfdoc/doc_basic.cpp @@ -288,23 +288,23 @@ CFX_WideString CPDF_FileSpec::DecodeFileName(const CFX_WideStringC& filepath) { #if _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ if (filepath.Left(sizeof("/Mac") - 1) == CFX_WideStringC(L"/Mac")) - return ChangeSlashToPlatform(filepath.raw_str() + 1); - return ChangeSlashToPlatform(filepath.raw_str()); + return ChangeSlashToPlatform(filepath.c_str() + 1); + return ChangeSlashToPlatform(filepath.c_str()); #elif _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ if (filepath.GetAt(0) != '/') - return ChangeSlashToPlatform(filepath.raw_str()); + return ChangeSlashToPlatform(filepath.c_str()); if (filepath.GetAt(1) == '/') - return ChangeSlashToPlatform(filepath.raw_str() + 1); + return ChangeSlashToPlatform(filepath.c_str() + 1); if (filepath.GetAt(2) == '/') { CFX_WideString result; result += filepath.GetAt(1); result += ':'; - result += ChangeSlashToPlatform(filepath.raw_str() + 2); + result += ChangeSlashToPlatform(filepath.c_str() + 2); return result; } CFX_WideString result; result += '\\'; - result += ChangeSlashToPlatform(filepath.raw_str()); + result += ChangeSlashToPlatform(filepath.c_str()); return result; #else return filepath; @@ -356,27 +356,27 @@ CFX_WideString CPDF_FileSpec::EncodeFileName(const CFX_WideStringC& filepath) { if (filepath.GetAt(2) != '\\') { result += '/'; } - result += ChangeSlashToPDF(filepath.raw_str() + 2); + result += ChangeSlashToPDF(filepath.c_str() + 2); return result; } if (filepath.GetAt(0) == '\\' && filepath.GetAt(1) == '\\') { - return ChangeSlashToPDF(filepath.raw_str() + 1); + return ChangeSlashToPDF(filepath.c_str() + 1); } if (filepath.GetAt(0) == '\\') { CFX_WideString result; result = '/'; - result += ChangeSlashToPDF(filepath.raw_str()); + result += ChangeSlashToPDF(filepath.c_str()); return result; } - return ChangeSlashToPDF(filepath.raw_str()); + return ChangeSlashToPDF(filepath.c_str()); #elif _FXM_PLATFORM_ == _FXM_PLATFORM_APPLE_ if (filepath.Left(sizeof("Mac") - 1) == FX_WSTRC(L"Mac")) { CFX_WideString result; result = '/'; - result += ChangeSlashToPDF(filepath.raw_str()); + result += ChangeSlashToPDF(filepath.c_str()); return result; } - return ChangeSlashToPDF(filepath.raw_str()); + return ChangeSlashToPDF(filepath.c_str()); #else return filepath; #endif @@ -513,5 +513,5 @@ int32_t CPDF_PageLabel::GetPageByLabel(const CFX_ByteStringC& bsLabel) const { return -1; } int32_t CPDF_PageLabel::GetPageByLabel(const CFX_WideStringC& wsLabel) const { - return GetPageByLabel(PDF_EncodeText(wsLabel.raw_str()).AsByteStringC()); + return GetPageByLabel(PDF_EncodeText(wsLabel.c_str()).AsByteStringC()); } |