summaryrefslogtreecommitdiff
path: root/core/fxcodec/jbig2/JBig2_SymbolDict.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/fxcodec/jbig2/JBig2_SymbolDict.h')
-rw-r--r--core/fxcodec/jbig2/JBig2_SymbolDict.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/core/fxcodec/jbig2/JBig2_SymbolDict.h b/core/fxcodec/jbig2/JBig2_SymbolDict.h
index 4520f76680..d6b897ce70 100644
--- a/core/fxcodec/jbig2/JBig2_SymbolDict.h
+++ b/core/fxcodec/jbig2/JBig2_SymbolDict.h
@@ -8,10 +8,10 @@
#define CORE_FXCODEC_JBIG2_JBIG2_SYMBOLDICT_H_
#include <memory>
+#include <utility>
#include <vector>
#include "core/fxcodec/jbig2/JBig2_ArithDecoder.h"
-#include "core/fxcodec/jbig2/JBig2_List.h"
#include "core/fxcrt/fx_basic.h"
class CJBig2_Image;
@@ -24,10 +24,12 @@ class CJBig2_SymbolDict {
std::unique_ptr<CJBig2_SymbolDict> DeepCopy() const;
// Takes ownership of |image|.
- void AddImage(CJBig2_Image* image) { m_SDEXSYMS.push_back(image); }
+ void AddImage(std::unique_ptr<CJBig2_Image> image) {
+ m_SDEXSYMS.push_back(std::move(image));
+ }
size_t NumImages() const { return m_SDEXSYMS.size(); }
- CJBig2_Image* GetImage(size_t index) const { return m_SDEXSYMS.get(index); }
+ CJBig2_Image* GetImage(size_t index) const { return m_SDEXSYMS[index].get(); }
const std::vector<JBig2ArithCtx>& GbContext() const { return m_gbContext; }
const std::vector<JBig2ArithCtx>& GrContext() const { return m_grContext; }
@@ -42,7 +44,7 @@ class CJBig2_SymbolDict {
private:
std::vector<JBig2ArithCtx> m_gbContext;
std::vector<JBig2ArithCtx> m_grContext;
- CJBig2_List<CJBig2_Image> m_SDEXSYMS;
+ std::vector<std::unique_ptr<CJBig2_Image>> m_SDEXSYMS;
};
#endif // CORE_FXCODEC_JBIG2_JBIG2_SYMBOLDICT_H_