diff options
author | Dan Sinclair <dsinclair@chromium.org> | 2016-03-14 13:35:12 -0400 |
---|---|---|
committer | Dan Sinclair <dsinclair@chromium.org> | 2016-03-14 13:35:12 -0400 |
commit | 764ec513eecbebd12781bcc96ce81ed5e736ee92 (patch) | |
tree | 12763fde4be1f10ea1183d92185917b2b587e00b /core/fxcodec/jbig2/JBig2_Segment.cpp | |
parent | 97da97662417085774f75c26e535c6fbe70266ae (diff) | |
download | pdfium-764ec513eecbebd12781bcc96ce81ed5e736ee92.tar.xz |
Move core/src/ up to core/.
This CL moves the core/src/ files up to core/ and fixes up the include guards,
includes and build files.
R=tsepez@chromium.org
Review URL: https://codereview.chromium.org/1800523005 .
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_Segment.cpp')
-rw-r--r-- | core/fxcodec/jbig2/JBig2_Segment.cpp | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/core/fxcodec/jbig2/JBig2_Segment.cpp b/core/fxcodec/jbig2/JBig2_Segment.cpp new file mode 100644 index 0000000000..a6bac36141 --- /dev/null +++ b/core/fxcodec/jbig2/JBig2_Segment.cpp @@ -0,0 +1,44 @@ +// Copyright 2014 PDFium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +// Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com + +#include "core/fxcodec/jbig2/JBig2_Segment.h" + +#include "core/include/fxcrt/fx_memory.h" + +CJBig2_Segment::CJBig2_Segment() { + m_dwNumber = 0; + m_cFlags.c = 0; + m_nReferred_to_segment_count = 0; + m_pReferred_to_segment_numbers = NULL; + m_dwPage_association = 0; + m_dwData_length = 0; + m_dwHeader_Length = 0; + m_dwObjNum = 0; + m_dwDataOffset = 0; + m_State = JBIG2_SEGMENT_HEADER_UNPARSED; + m_nResultType = JBIG2_VOID_POINTER; + m_Result.vd = NULL; +} +CJBig2_Segment::~CJBig2_Segment() { + FX_Free(m_pReferred_to_segment_numbers); + + switch (m_nResultType) { + case JBIG2_IMAGE_POINTER: + delete m_Result.im; + break; + case JBIG2_SYMBOL_DICT_POINTER: + delete m_Result.sd; + break; + case JBIG2_PATTERN_DICT_POINTER: + delete m_Result.pd; + break; + case JBIG2_HUFFMAN_TABLE_POINTER: + delete m_Result.ht; + break; + default: + FX_Free(m_Result.vd); + } +} |