Chromium Code Reviews| Index: fpdfsdk/src/fsdk_actionhandler.cpp |
| diff --git a/fpdfsdk/src/fsdk_actionhandler.cpp b/fpdfsdk/src/fsdk_actionhandler.cpp |
| index 874fcc7ff56f7dbd6cd3db752afcfb52f4df1a97..7ec8bdd7b760ae46e6e3284b32b65edbe4eea0e4 100644 |
| --- a/fpdfsdk/src/fsdk_actionhandler.cpp |
| +++ b/fpdfsdk/src/fsdk_actionhandler.cpp |
| @@ -425,7 +425,7 @@ void CPDFSDK_ActionHandler::DoAction_NoJs(const CPDF_Action& action, |
| } |
| FX_BOOL CPDFSDK_ActionHandler::IsValidDocView(CPDFSDK_Document* pDocument) { |
| - ASSERT(pDocument != NULL); |
| + ASSERT(pDocument); |
| return TRUE; |
| } |
| @@ -434,17 +434,17 @@ void CPDFSDK_ActionHandler::DoAction_GoTo(CPDFSDK_Document* pDocument, |
| ASSERT(action); |
| CPDF_Document* pPDFDocument = pDocument->GetDocument(); |
| - ASSERT(pPDFDocument != NULL); |
| + ASSERT(pPDFDocument); |
|
Lei Zhang
2015/10/21 21:44:09
Don't bother keeping ones where it dereferences th
dsinclair
2015/10/22 13:31:12
Removed the assert for pApp, left the one for pPDF
|
| CPDFDoc_Environment* pApp = pDocument->GetEnv(); |
| - ASSERT(pApp != NULL); |
| + ASSERT(pApp); |
| CPDF_Dest MyDest = action.GetDest(pPDFDocument); |
| int nPageIndex = MyDest.GetPageIndex(pPDFDocument); |
| int nFitType = MyDest.GetZoomMode(); |
| - const CPDF_Array* pMyArray = (CPDF_Array*)MyDest.GetObject(); |
| - float* pPosAry = NULL; |
| + const CPDF_Array* pMyArray = ToArray(MyDest.GetObject()); |
| + float* pPosAry = nullptr; |
| int sizeOfAry = 0; |
| - if (pMyArray != NULL) { |
| + if (pMyArray) { |
| pPosAry = new float[pMyArray->GetCount()]; |
| int j = 0; |
| for (int i = 2; i < (int)pMyArray->GetCount(); i++) { |