Chromium Code Reviews| Index: fpdfsdk/src/fpdftext.cpp |
| diff --git a/fpdfsdk/src/fpdftext.cpp b/fpdfsdk/src/fpdftext.cpp |
| index aba24f4991fcd38aa2c0687203ee7b264b2bdcbd..9033920e2f1909e33140b3d55618ac1d467906d4 100644 |
| --- a/fpdfsdk/src/fpdftext.cpp |
| +++ b/fpdfsdk/src/fpdftext.cpp |
| @@ -26,11 +26,8 @@ DLLEXPORT FPDF_TEXTPAGE STDCALL FPDFText_LoadPage(FPDF_PAGE page) |
| } |
| DLLEXPORT void STDCALL FPDFText_ClosePage(FPDF_TEXTPAGE text_page) |
| { |
| - if (text_page){ |
| - IPDF_TextPage* textpage=(IPDF_TextPage*)text_page; |
| - delete textpage; |
| - text_page=NULL; |
| - } |
| + delete (IPDF_TextPage*)text_page; |
| + text_page = NULL; |
|
Tom Sepez
2015/07/16 17:22:44
nit: pointless assignment, not passed as ref.
Lei Zhang
2015/07/16 21:20:48
Done.
|
| } |
| DLLEXPORT int STDCALL FPDFText_CountChars(FPDF_TEXTPAGE text_page) |
| { |
| @@ -246,9 +243,7 @@ DLLEXPORT void STDCALL FPDFLink_GetRect(FPDF_PAGELINK link_page,int link_index, |
| } |
| DLLEXPORT void STDCALL FPDFLink_CloseWebLinks(FPDF_PAGELINK link_page) |
| { |
| - if (!link_page) return; |
| - IPDF_LinkExtract* pageLink=(IPDF_LinkExtract*)link_page; |
| - delete pageLink; |
| - pageLink =NULL; |
| + delete (IPDF_LinkExtract*)link_page; |
| + link_page = NULL; |
|
Tom Sepez
2015/07/16 17:22:44
nit: ditto.
Lei Zhang
2015/07/16 21:20:48
Done.
|
| } |