summaryrefslogtreecommitdiff
path: root/xfa/fxbarcode/pdf417/BC_PDF417BoundingBox.cpp
diff options
context:
space:
mode:
authorthestig <thestig@chromium.org>2016-04-28 17:29:19 -0700
committerCommit bot <commit-bot@chromium.org>2016-04-28 17:29:19 -0700
commit495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc (patch)
tree42abda300274f81009bdb9866e0f7e3f81164726 /xfa/fxbarcode/pdf417/BC_PDF417BoundingBox.cpp
parenta31098417852bdf13e693a6e0913e0706cf94098 (diff)
downloadpdfium-495bda110a6ea8e7a6fc313ec0232a9ca6e3cfdc.tar.xz
Do not check pointers before deleting them.
XFA edition. Review-Url: https://codereview.chromium.org/1925363002
Diffstat (limited to 'xfa/fxbarcode/pdf417/BC_PDF417BoundingBox.cpp')
-rw-r--r--xfa/fxbarcode/pdf417/BC_PDF417BoundingBox.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/xfa/fxbarcode/pdf417/BC_PDF417BoundingBox.cpp b/xfa/fxbarcode/pdf417/BC_PDF417BoundingBox.cpp
index c8328ab1c6..d2ad98e408 100644
--- a/xfa/fxbarcode/pdf417/BC_PDF417BoundingBox.cpp
+++ b/xfa/fxbarcode/pdf417/BC_PDF417BoundingBox.cpp
@@ -42,20 +42,14 @@ CBC_BoundingBox::CBC_BoundingBox(CBC_BoundingBox* boundingBox) {
init(boundingBox->m_image, boundingBox->m_topLeft, boundingBox->m_bottomLeft,
boundingBox->m_topRight, boundingBox->m_bottomRight);
}
+
CBC_BoundingBox::~CBC_BoundingBox() {
- if (m_topLeft) {
- delete m_topLeft;
- }
- if (m_bottomLeft) {
- delete m_bottomLeft;
- }
- if (m_topRight) {
- delete m_topRight;
- }
- if (m_bottomRight) {
- delete m_bottomRight;
- }
+ delete m_topLeft;
+ delete m_bottomLeft;
+ delete m_topRight;
+ delete m_bottomRight;
}
+
CBC_BoundingBox* CBC_BoundingBox::merge(CBC_BoundingBox* leftBox,
CBC_BoundingBox* rightBox,
int32_t& e) {