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

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

Issue 1084613006: Fix all remaining instances of FX_NEW. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: std::min Created 5 years, 8 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_extension.cpp ('k') | core/src/fxcrt/fxcrt_posix.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()
11 { 11 {
12 return FX_NEW CFXCRT_FileAccess_CRT; 12 return new CFXCRT_FileAccess_CRT;
13 } 13 }
14 void FXCRT_GetFileModeString(FX_DWORD dwModes, CFX_ByteString &bsMode) 14 void FXCRT_GetFileModeString(FX_DWORD dwModes, CFX_ByteString &bsMode)
15 { 15 {
16 if (dwModes & FX_FILEMODE_ReadOnly) { 16 if (dwModes & FX_FILEMODE_ReadOnly) {
17 bsMode = FX_BSTRC("rb"); 17 bsMode = FX_BSTRC("rb");
18 } else if (dwModes & FX_FILEMODE_Truncate) { 18 } else if (dwModes & FX_FILEMODE_Truncate) {
19 bsMode = FX_BSTRC("w+b"); 19 bsMode = FX_BSTRC("w+b");
20 } else { 20 } else {
21 bsMode = FX_BSTRC("a+b"); 21 bsMode = FX_BSTRC("a+b");
22 } 22 }
(...skipping 163 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_extension.cpp ('k') | core/src/fxcrt/fxcrt_posix.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698