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

Side by Side Diff: xfa/fgas/crt/fgas_stream.cpp

Issue 1882043004: Remove implicit cast from CFX_WideString to (const wchar_t*) (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: win error #2 Created 4 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 | « xfa/fee/fde_txtedtengine.cpp ('k') | xfa/fgas/font/fgas_fontutils.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 "xfa/fgas/crt/fgas_stream.h" 7 #include "xfa/fgas/crt/fgas_stream.h"
8 8
9 #include <algorithm> 9 #include <algorithm>
10 10
(...skipping 370 matching lines...) Expand 10 before | Expand all | Expand 10 after
381 if (m_hFile != NULL) { 381 if (m_hFile != NULL) {
382 FXSYS_fclose(m_hFile); 382 FXSYS_fclose(m_hFile);
383 } 383 }
384 } 384 }
385 FX_BOOL CFX_FileStreamImp::LoadFile(const FX_WCHAR* pszSrcFileName, 385 FX_BOOL CFX_FileStreamImp::LoadFile(const FX_WCHAR* pszSrcFileName,
386 uint32_t dwAccess) { 386 uint32_t dwAccess) {
387 FXSYS_assert(m_hFile == NULL); 387 FXSYS_assert(m_hFile == NULL);
388 FXSYS_assert(pszSrcFileName != NULL && FXSYS_wcslen(pszSrcFileName) > 0); 388 FXSYS_assert(pszSrcFileName != NULL && FXSYS_wcslen(pszSrcFileName) > 0);
389 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN32_MOBILE_ || \ 389 #if _FX_OS_ == _FX_WIN32_DESKTOP_ || _FX_OS_ == _FX_WIN32_MOBILE_ || \
390 _FX_OS_ == _FX_WIN64_ 390 _FX_OS_ == _FX_WIN64_
391 CFX_WideString wsMode; 391 const FX_WCHAR* wsMode;
392 if (dwAccess & FX_STREAMACCESS_Write) { 392 if (dwAccess & FX_STREAMACCESS_Write) {
393 if (dwAccess & FX_STREAMACCESS_Append) { 393 if (dwAccess & FX_STREAMACCESS_Append) {
394 wsMode = L"a+b"; 394 wsMode = L"a+b";
395 } else if (dwAccess & FX_STREAMACCESS_Truncate) { 395 } else if (dwAccess & FX_STREAMACCESS_Truncate) {
396 wsMode = L"w+b"; 396 wsMode = L"w+b";
397 } else { 397 } else {
398 wsMode = L"r+b"; 398 wsMode = L"r+b";
399 } 399 }
400 } else { 400 } else {
401 wsMode = L"rb"; 401 wsMode = L"rb";
(...skipping 1215 matching lines...) Expand 10 before | Expand all | Expand 10 after
1617 return m_pStream->WriteData((const uint8_t*)pData, (int32_t)size) == 1617 return m_pStream->WriteData((const uint8_t*)pData, (int32_t)size) ==
1618 (int32_t)size; 1618 (int32_t)size;
1619 } 1619 }
1620 FX_BOOL CFGAS_FileWrite::WriteBlock(const void* pData, 1620 FX_BOOL CFGAS_FileWrite::WriteBlock(const void* pData,
1621 FX_FILESIZE offset, 1621 FX_FILESIZE offset,
1622 size_t size) { 1622 size_t size) {
1623 m_pStream->Seek(FX_STREAMSEEK_Begin, offset); 1623 m_pStream->Seek(FX_STREAMSEEK_Begin, offset);
1624 int32_t iLen = m_pStream->WriteData((uint8_t*)pData, (int32_t)size); 1624 int32_t iLen = m_pStream->WriteData((uint8_t*)pData, (int32_t)size);
1625 return iLen == (int32_t)size; 1625 return iLen == (int32_t)size;
1626 } 1626 }
OLDNEW
« no previous file with comments | « xfa/fee/fde_txtedtengine.cpp ('k') | xfa/fgas/font/fgas_fontutils.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698