Home | History | Annotate | Download | only in jbig2
      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 "core/fxcrt/fx_memory.h"
     11 #include "third_party/base/ptr_util.h"
     12 
     13 CJBig2_SymbolDict::CJBig2_SymbolDict() {}
     14 
     15 CJBig2_SymbolDict::~CJBig2_SymbolDict() {}
     16 
     17 std::unique_ptr<CJBig2_SymbolDict> CJBig2_SymbolDict::DeepCopy() const {
     18   auto dst = pdfium::MakeUnique<CJBig2_SymbolDict>();
     19   for (const auto& image : m_SDEXSYMS) {
     20     dst->m_SDEXSYMS.push_back(image ? pdfium::MakeUnique<CJBig2_Image>(*image)
     21                                     : nullptr);
     22   }
     23   dst->m_gbContext = m_gbContext;
     24   dst->m_grContext = m_grContext;
     25   return dst;
     26 }
     27