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

Unified Diff: fpdfsdk/src/fpdfdoc.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/fpdf_transformpage.cpp ('k') | fpdfsdk/src/fpdfeditimg.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfdoc.cpp
diff --git a/fpdfsdk/src/fpdfdoc.cpp b/fpdfsdk/src/fpdfdoc.cpp
index f75197bdbf810e80b4355a179900898fbefc6401..e2640697bb17c8cf90f38cd8722a66ec7028fa71 100644
--- a/fpdfsdk/src/fpdfdoc.cpp
+++ b/fpdfsdk/src/fpdfdoc.cpp
@@ -208,13 +208,13 @@ DLLEXPORT FPDF_ACTION STDCALL FPDFLink_GetAction(FPDF_LINK pDict)
DLLEXPORT FPDF_BOOL STDCALL FPDFLink_Enumerate(FPDF_PAGE page, int* startPos, FPDF_LINK* linkAnnot)
{
if(!page || !startPos || !linkAnnot)
- return FALSE;
+ return false;
CPDF_Page* pPage = (CPDF_Page*)page;
if(!pPage->m_pFormDict)
- return FALSE;
+ return false;
CPDF_Array* pAnnots = pPage->m_pFormDict->GetArray("Annots");
if(!pAnnots)
- return FALSE;
+ return false;
for (int i = *startPos; i < (int)pAnnots->GetCount(); i++) {
CPDF_Dictionary* pDict = (CPDF_Dictionary*)pAnnots->GetElementValue(i);
if (!pDict || pDict->GetType() != PDFOBJ_DICTIONARY)
@@ -222,23 +222,23 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFLink_Enumerate(FPDF_PAGE page, int* startPos, FP
if(pDict->GetString(FX_BSTRC("Subtype")).Equal(FX_BSTRC("Link"))) {
*startPos = i + 1;
*linkAnnot = (FPDF_LINK)pDict;
- return TRUE;
+ return true;
}
}
- return FALSE;
+ return false;
}
DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetAnnotRect(FPDF_LINK linkAnnot, FS_RECTF* rect)
{
if(!linkAnnot || !rect)
- return FALSE;
+ return false;
CPDF_Dictionary* pAnnotDict = (CPDF_Dictionary*)linkAnnot;
CPDF_Rect rt = pAnnotDict->GetRect(FX_BSTRC("Rect"));
rect->left = rt.left;
rect->bottom = rt.bottom;
rect->right = rt.right;
rect->top = rt.top;
- return TRUE;
+ return true;
}
DLLEXPORT int STDCALL FPDFLink_CountQuadPoints(FPDF_LINK linkAnnot)
@@ -255,12 +255,12 @@ DLLEXPORT int STDCALL FPDFLink_CountQuadPoints(FPDF_LINK linkAnnot)
DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot, int quadIndex, FS_QUADPOINTSF* quadPoints)
{
if(!linkAnnot || !quadPoints)
- return FALSE;
+ return false;
CPDF_Dictionary* pAnnotDict = (CPDF_Dictionary*)linkAnnot;
CPDF_Array* pArray = pAnnotDict->GetArray(FX_BSTRC("QuadPoints"));
if (pArray) {
if (quadIndex < 0 || quadIndex >= (int)pArray->GetCount()/8 || ((quadIndex*8+7) >= (int)pArray->GetCount()))
- return FALSE;
+ return false;
quadPoints->x1 = pArray->GetNumber(quadIndex*8);
quadPoints->y1 = pArray->GetNumber(quadIndex*8+1);
quadPoints->x2 = pArray->GetNumber(quadIndex*8+2);
@@ -269,9 +269,9 @@ DLLEXPORT FPDF_BOOL STDCALL FPDFLink_GetQuadPoints(FPDF_LINK linkAnnot, int quad
quadPoints->y3 = pArray->GetNumber(quadIndex*8+5);
quadPoints->x4 = pArray->GetNumber(quadIndex*8+6);
quadPoints->y4 = pArray->GetNumber(quadIndex*8+7);
- return TRUE;
+ return true;
}
- return FALSE;
+ return false;
}
DLLEXPORT unsigned long STDCALL FPDF_GetMetaText(FPDF_DOCUMENT doc, FPDF_BYTESTRING tag,
« no previous file with comments | « fpdfsdk/src/fpdf_transformpage.cpp ('k') | fpdfsdk/src/fpdfeditimg.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698