xref: /aosp_15_r20/external/pdfium/core/fxcodec/jbig2/JBig2_SymbolDict.cpp (revision 3ac0a46f773bac49fa9476ec2b1cf3f8da5ec3a4)
1 // Copyright 2014 The PDFium Authors
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 
CJBig2_SymbolDict()11 CJBig2_SymbolDict::CJBig2_SymbolDict() {}
12 
13 CJBig2_SymbolDict::~CJBig2_SymbolDict() = default;
14 
DeepCopy() const15 std::unique_ptr<CJBig2_SymbolDict> CJBig2_SymbolDict::DeepCopy() const {
16   auto dst = std::make_unique<CJBig2_SymbolDict>();
17   for (const auto& image : m_SDEXSYMS) {
18     dst->m_SDEXSYMS.push_back(image ? std::make_unique<CJBig2_Image>(*image)
19                                     : nullptr);
20   }
21   dst->m_gbContext = m_gbContext;
22   dst->m_grContext = m_grContext;
23   return dst;
24 }
25