summaryrefslogtreecommitdiff
path: root/core/src/fpdfdoc/pdf_vt.h
diff options
context:
space:
mode:
authorLei Zhang <thestig@chromium.org>2015-06-19 14:51:10 -0700
committerLei Zhang <thestig@chromium.org>2015-06-19 14:51:10 -0700
commitcfac954abcab7caf47d3fa3d641c553cba998271 (patch)
tree4cd546a2377e973fec54b75c1002c8c0ff321e8f /core/src/fpdfdoc/pdf_vt.h
parentdf558514bf5cb5750d5a7000a843f45f4170d5a4 (diff)
downloadpdfium-cfac954abcab7caf47d3fa3d641c553cba998271.tar.xz
Cleanup: Do not check pointers before deleting them.
R=tsepez@chromium.org Review URL: https://codereview.chromium.org/1192743004.
Diffstat (limited to 'core/src/fpdfdoc/pdf_vt.h')
-rw-r--r--core/src/fpdfdoc/pdf_vt.h12
1 files changed, 3 insertions, 9 deletions
diff --git a/core/src/fpdfdoc/pdf_vt.h b/core/src/fpdfdoc/pdf_vt.h
index 5acab96fbd..a75490fcd5 100644
--- a/core/src/fpdfdoc/pdf_vt.h
+++ b/core/src/fpdfdoc/pdf_vt.h
@@ -84,12 +84,8 @@ struct CPVT_SectionInfo {
}
virtual ~CPVT_SectionInfo()
{
- if (pSecProps) {
- delete pSecProps;
- }
- if (pWordProps) {
- delete pWordProps;
- }
+ delete pSecProps;
+ delete pWordProps;
}
CPVT_SectionInfo(const CPVT_SectionInfo & other): rcSection(), nTotalLine(0), pSecProps(NULL), pWordProps(NULL)
{
@@ -148,9 +144,7 @@ struct CPVT_WordInfo {
}
virtual ~CPVT_WordInfo()
{
- if (pWordProps) {
- delete pWordProps;
- }
+ delete pWordProps;
}
CPVT_WordInfo(const CPVT_WordInfo & word): Word(0), nCharset(0),
fWordX(0.0f), fWordY(0.0f), fWordTail(0.0f), nFontIndex(-1), pWordProps(NULL)