Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(980)

Side by Side Diff: core/src/fxcrt/fxcrt_platforms.cpp

Issue 809993004: Get rid of FX_LPCSTR cast. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Indent Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/src/fxcrt/fx_basic_buffer.cpp ('k') | core/src/fxge/android/fpf_skiafontmgr.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../include/fxcrt/fx_ext.h" 7 #include "../../include/fxcrt/fx_ext.h"
8 #include "fxcrt_platforms.h" 8 #include "fxcrt_platforms.h"
9 #if (_FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ && _FXM_PLATFORM_ != _FXM_PLATFORM _LINUX_ && _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ && _FXM_PLATFORM_ != _FXM_PLAT FORM_ANDROID_) 9 #if (_FXM_PLATFORM_ != _FXM_PLATFORM_WINDOWS_ && _FXM_PLATFORM_ != _FXM_PLATFORM _LINUX_ && _FXM_PLATFORM_ != _FXM_PLATFORM_APPLE_ && _FXM_PLATFORM_ != _FXM_PLAT FORM_ANDROID_)
10 IFXCRT_FileAccess* FXCRT_FileAccess_Create() 10 IFXCRT_FileAccess* FXCRT_FileAccess_Create()
(...skipping 28 matching lines...) Expand all
39 { 39 {
40 Close(); 40 Close();
41 } 41 }
42 FX_BOOL CFXCRT_FileAccess_CRT::Open(FX_BSTR fileName, FX_DWORD dwMode) 42 FX_BOOL CFXCRT_FileAccess_CRT::Open(FX_BSTR fileName, FX_DWORD dwMode)
43 { 43 {
44 if (m_hFile) { 44 if (m_hFile) {
45 return FALSE; 45 return FALSE;
46 } 46 }
47 CFX_ByteString strMode; 47 CFX_ByteString strMode;
48 FXCRT_GetFileModeString(dwMode, strMode); 48 FXCRT_GetFileModeString(dwMode, strMode);
49 m_hFile = FXSYS_fopen(fileName.GetCStr(), (FX_LPCSTR)strMode); 49 m_hFile = FXSYS_fopen(fileName.GetCStr(), strMode.c_str());
50 return m_hFile != NULL; 50 return m_hFile != NULL;
51 } 51 }
52 FX_BOOL CFXCRT_FileAccess_CRT::Open(FX_WSTR fileName, FX_DWORD dwMode) 52 FX_BOOL CFXCRT_FileAccess_CRT::Open(FX_WSTR fileName, FX_DWORD dwMode)
53 { 53 {
54 if (m_hFile) { 54 if (m_hFile) {
55 return FALSE; 55 return FALSE;
56 } 56 }
57 CFX_WideString strMode; 57 CFX_WideString strMode;
58 FXCRT_GetFileModeString(dwMode, strMode); 58 FXCRT_GetFileModeString(dwMode, strMode);
59 m_hFile = FXSYS_wfopen(fileName.GetPtr(), strMode.c_str()); 59 m_hFile = FXSYS_wfopen(fileName.GetPtr(), strMode.c_str());
(...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after
186 } 186 }
187 FX_BOOL FX_File_Move(FX_BSTR fileNameSrc, FX_BSTR fileNameDst) 187 FX_BOOL FX_File_Move(FX_BSTR fileNameSrc, FX_BSTR fileNameDst)
188 { 188 {
189 return rename(fileNameSrc.GetCStr(), fileNameDst.GetCStr()); 189 return rename(fileNameSrc.GetCStr(), fileNameDst.GetCStr());
190 } 190 }
191 FX_BOOL FX_File_Move(FX_WSTR fileNameSrc, FX_WSTR fileNameDst) 191 FX_BOOL FX_File_Move(FX_WSTR fileNameSrc, FX_WSTR fileNameDst)
192 { 192 {
193 return FX_File_Move(FX_UTF8Encode(fileNameSrc), FX_UTF8Encode(fileNameDst)); 193 return FX_File_Move(FX_UTF8Encode(fileNameSrc), FX_UTF8Encode(fileNameDst));
194 } 194 }
195 #endif 195 #endif
OLDNEW
« no previous file with comments | « core/src/fxcrt/fx_basic_buffer.cpp ('k') | core/src/fxge/android/fpf_skiafontmgr.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698