1 // Copyright 2014 PDFium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 6 7 #include "core/fxcodec/jbig2/JBig2_SymbolDict.h" 8 9 #include "core/fxcodec/jbig2/JBig2_Image.h" 10 #include "third_party/base/ptr_util.h" 11 CJBig2_SymbolDict()12CJBig2_SymbolDict::CJBig2_SymbolDict() {} 13 ~CJBig2_SymbolDict()14CJBig2_SymbolDict::~CJBig2_SymbolDict() {} 15 DeepCopy() const16std::unique_ptr<CJBig2_SymbolDict> CJBig2_SymbolDict::DeepCopy() const { 17 auto dst = pdfium::MakeUnique<CJBig2_SymbolDict>(); 18 for (const auto& image : m_SDEXSYMS) { 19 dst->m_SDEXSYMS.push_back(image ? pdfium::MakeUnique<CJBig2_Image>(*image) 20 : nullptr); 21 } 22 dst->m_gbContext = m_gbContext; 23 dst->m_grContext = m_grContext; 24 return dst; 25 } 26