diff options
author | Tom Sepez <tsepez@chromium.org> | 2015-06-10 16:51:15 -0700 |
---|---|---|
committer | Tom Sepez <tsepez@chromium.org> | 2015-06-10 16:51:15 -0700 |
commit | 6f0a64a1bf18ab6636404cdfb883897459083a4d (patch) | |
tree | 1ef1326c8bb015213e0cdf0d726a27a537d09c73 /core/src/fxcrt/fxcrt_windows.cpp | |
parent | e4503ea9947d2f9c61704da20271b413a364a9c0 (diff) | |
download | pdfium-6f0a64a1bf18ab6636404cdfb883897459083a4d.tar.xz |
Remove FX_BSTR and FX_WSTR typedefs.chromium/2434chromium/2433chromium/2432chromium/2431chromium/2430
These stand for const CFX_{Byte,Wide}StringC&, which is just
monumentally confusing, since there are so many string types
running around here.
The following had manual changes:
core/src/fpdfapi/fpdf_edit/fpdf_edit_content.cpp
core/src/fpdfapi/fpdf_render/fpdf_render_loadimage.cpp
core/src/fpdfdoc/doc_form.cpp
fpdfsdk/src/fpdf_ext.cpp
R=thestig@chromium.org
Review URL: https://codereview.chromium.org/1180593004.
Diffstat (limited to 'core/src/fxcrt/fxcrt_windows.cpp')
-rw-r--r-- | core/src/fxcrt/fxcrt_windows.cpp | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/core/src/fxcrt/fxcrt_windows.cpp b/core/src/fxcrt/fxcrt_windows.cpp index 05ed6196dd..c16f25624a 100644 --- a/core/src/fxcrt/fxcrt_windows.cpp +++ b/core/src/fxcrt/fxcrt_windows.cpp @@ -7,7 +7,7 @@ #include "../../include/fxcrt/fx_ext.h" #include "fxcrt_windows.h" #if _FXM_PLATFORM_ == _FXM_PLATFORM_WINDOWS_ -FX_BOOL FX_File_Exist(FX_BSTR fileName) +FX_BOOL FX_File_Exist(const CFX_ByteStringC& fileName) { FX_DWORD dwAttri = ::GetFileAttributesA(fileName.GetCStr()); if (dwAttri == -1) { @@ -15,7 +15,7 @@ FX_BOOL FX_File_Exist(FX_BSTR fileName) } return (dwAttri & FILE_ATTRIBUTE_DIRECTORY) == 0; } -FX_BOOL FX_File_Exist(FX_WSTR fileName) +FX_BOOL FX_File_Exist(const CFX_WideStringC& fileName) { FX_DWORD dwAttri = ::GetFileAttributesW((LPCWSTR)fileName.GetPtr()); if (dwAttri == -1) { @@ -54,7 +54,7 @@ CFXCRT_FileAccess_Win64::~CFXCRT_FileAccess_Win64() { Close(); } -FX_BOOL CFXCRT_FileAccess_Win64::Open(FX_BSTR fileName, FX_DWORD dwMode) +FX_BOOL CFXCRT_FileAccess_Win64::Open(const CFX_ByteStringC& fileName, FX_DWORD dwMode) { if (m_hFile) { return FALSE; @@ -67,7 +67,7 @@ FX_BOOL CFXCRT_FileAccess_Win64::Open(FX_BSTR fileName, FX_DWORD dwMode) } return m_hFile != NULL; } -FX_BOOL CFXCRT_FileAccess_Win64::Open(FX_WSTR fileName, FX_DWORD dwMode) +FX_BOOL CFXCRT_FileAccess_Win64::Open(const CFX_WideStringC& fileName, FX_DWORD dwMode) { if (m_hFile) { return FALSE; @@ -187,27 +187,27 @@ FX_BOOL CFXCRT_FileAccess_Win64::Truncate(FX_FILESIZE szFile) } return ::SetEndOfFile(m_hFile); } -FX_BOOL FX_File_Delete(FX_BSTR fileName) +FX_BOOL FX_File_Delete(const CFX_ByteStringC& fileName) { return ::DeleteFileA(fileName.GetCStr()); } -FX_BOOL FX_File_Delete(FX_WSTR fileName) +FX_BOOL FX_File_Delete(const CFX_WideStringC& fileName) { return ::DeleteFileW((LPCWSTR)fileName.GetPtr()); } -FX_BOOL FX_File_Copy(FX_BSTR fileNameSrc, FX_BSTR fileNameDst) +FX_BOOL FX_File_Copy(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst) { return ::CopyFileA(fileNameSrc.GetCStr(), fileNameDst.GetCStr(), FALSE); } -FX_BOOL FX_File_Copy(FX_WSTR fileNameSrc, FX_WSTR fileNameDst) +FX_BOOL FX_File_Copy(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst) { return ::CopyFileW((LPCWSTR)fileNameSrc.GetPtr(), (LPCWSTR)fileNameDst.GetPtr(), FALSE); } -FX_BOOL FX_File_Move(FX_BSTR fileNameSrc, FX_BSTR fileNameDst) +FX_BOOL FX_File_Move(const CFX_ByteStringC& fileNameSrc, const CFX_ByteStringC& fileNameDst) { return ::MoveFileA(fileNameSrc.GetCStr(), fileNameDst.GetCStr()); } -FX_BOOL FX_File_Move(FX_WSTR fileNameSrc, FX_WSTR fileNameDst) +FX_BOOL FX_File_Move(const CFX_WideStringC& fileNameSrc, const CFX_WideStringC& fileNameDst) { return ::MoveFileW((LPCWSTR)fileNameSrc.GetPtr(), (LPCWSTR)fileNameDst.GetPtr()); } |