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

Unified Diff: fpdfsdk/src/fpdfsave.cpp

Issue 1254703002: FX_BOOL considered harmful, part 2. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 5 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/src/fpdfppo.cpp ('k') | fpdfsdk/src/fpdftext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfsave.cpp
diff --git a/fpdfsdk/src/fpdfsave.cpp b/fpdfsdk/src/fpdfsave.cpp
index ddd6f6e90ebf2039ee118936a3b2b8640206887e..8e5e476ca2a36d0089ac573747c66703c76d8a98 100644
--- a/fpdfsdk/src/fpdfsave.cpp
+++ b/fpdfsdk/src/fpdfsave.cpp
@@ -19,8 +19,8 @@ class CFX_IFileWrite final : public IFX_StreamWrite
public:
CFX_IFileWrite();
- FX_BOOL Init( FPDF_FILEWRITE * pFileWriteStruct );
- virtual FX_BOOL WriteBlock(const void* pData, size_t size) override;
+ bool Init( FPDF_FILEWRITE * pFileWriteStruct );
+ virtual bool WriteBlock(const void* pData, size_t size) override;
virtual void Release() override {}
protected:
@@ -32,22 +32,22 @@ CFX_IFileWrite::CFX_IFileWrite()
m_pFileWriteStruct = NULL;
}
-FX_BOOL CFX_IFileWrite::Init( FPDF_FILEWRITE * pFileWriteStruct )
+bool CFX_IFileWrite::Init( FPDF_FILEWRITE * pFileWriteStruct )
{
if (!pFileWriteStruct)
- return FALSE;
+ return false;
m_pFileWriteStruct = pFileWriteStruct;
- return TRUE;
+ return true;
}
-FX_BOOL CFX_IFileWrite::WriteBlock(const void* pData, size_t size)
+bool CFX_IFileWrite::WriteBlock(const void* pData, size_t size)
{
if (!m_pFileWriteStruct)
- return FALSE;
+ return false;
m_pFileWriteStruct->WriteBlock( m_pFileWriteStruct, pData, size );
- return TRUE;
+ return true;
}
FPDF_BOOL _FPDF_Doc_Save(FPDF_DOCUMENT document,FPDF_FILEWRITE * pFileWrite,FPDF_DWORD flags, FPDF_BOOL bSetVersion,
@@ -71,7 +71,7 @@ FPDF_BOOL _FPDF_Doc_Save(FPDF_DOCUMENT document,FPDF_FILEWRITE * pFileWrite,FPDF
FileMaker.RemoveSecurity();
}
CFX_IFileWrite* pStreamWrite = NULL;
- FX_BOOL bRet;
+ bool bRet;
pStreamWrite = new CFX_IFileWrite;
pStreamWrite->Init( pFileWrite );
bRet = FileMaker.Create(pStreamWrite, flags);
@@ -82,12 +82,12 @@ FPDF_BOOL _FPDF_Doc_Save(FPDF_DOCUMENT document,FPDF_FILEWRITE * pFileWrite,FPDF
DLLEXPORT FPDF_BOOL STDCALL FPDF_SaveAsCopy( FPDF_DOCUMENT document,FPDF_FILEWRITE * pFileWrite,
FPDF_DWORD flags )
{
- return _FPDF_Doc_Save(document, pFileWrite, flags, FALSE , 0);
+ return _FPDF_Doc_Save(document, pFileWrite, flags, false , 0);
}
DLLEXPORT FPDF_BOOL STDCALL FPDF_SaveWithVersion( FPDF_DOCUMENT document,FPDF_FILEWRITE * pFileWrite,
FPDF_DWORD flags, int fileVersion)
{
- return _FPDF_Doc_Save(document, pFileWrite, flags, TRUE , fileVersion);
+ return _FPDF_Doc_Save(document, pFileWrite, flags, true , fileVersion);
}
« no previous file with comments | « fpdfsdk/src/fpdfppo.cpp ('k') | fpdfsdk/src/fpdftext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698