summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2018-06-26 20:49:30 +0000
committerChromium commit bot <commit-bot@chromium.org>2018-06-26 20:49:30 +0000
commit4bd3a815393b3a6b2d9840fdd1de121deceb7b12 (patch)
tree609d720adb763a5e598a53db2e96b0f5c6121460
parentc4dce690f433a41c4429e872c2306e09b14c5d9f (diff)
downloadpdfium-4bd3a815393b3a6b2d9840fdd1de121deceb7b12.tar.xz
Use unowned ptr in CPDF_Cmap
Change-Id: Id6551957405605cf273d5d100b6db9c27ecc6e7c Reviewed-on: https://pdfium-review.googlesource.com/36131 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
-rw-r--r--core/fpdfapi/font/cpdf_cmap.cpp2
-rw-r--r--core/fpdfapi/font/cpdf_cmap.h4
2 files changed, 3 insertions, 3 deletions
diff --git a/core/fpdfapi/font/cpdf_cmap.cpp b/core/fpdfapi/font/cpdf_cmap.cpp
index d6b4264b6b..c761959d8b 100644
--- a/core/fpdfapi/font/cpdf_cmap.cpp
+++ b/core/fpdfapi/font/cpdf_cmap.cpp
@@ -317,7 +317,7 @@ uint16_t CPDF_CMap::CIDFromCharCode(uint32_t charcode) const {
return static_cast<uint16_t>(charcode);
if (m_pEmbedMap)
- return FPDFAPI_CIDFromCharCode(m_pEmbedMap, charcode);
+ return FPDFAPI_CIDFromCharCode(m_pEmbedMap.Get(), charcode);
if (m_DirectCharcodeToCIDTable.empty())
return static_cast<uint16_t>(charcode);
diff --git a/core/fpdfapi/font/cpdf_cmap.h b/core/fpdfapi/font/cpdf_cmap.h
index 96ccf02c0b..781f0f9439 100644
--- a/core/fpdfapi/font/cpdf_cmap.h
+++ b/core/fpdfapi/font/cpdf_cmap.h
@@ -73,7 +73,7 @@ class CPDF_CMap : public Retainable {
}
int GetCoding() const { return m_Coding; }
- const FXCMAP_CMap* GetEmbedMap() const { return m_pEmbedMap; }
+ const FXCMAP_CMap* GetEmbedMap() const { return m_pEmbedMap.Get(); }
CIDSet GetCharset() const { return m_Charset; }
void SetCharset(CIDSet set) { m_Charset = set; }
@@ -98,7 +98,7 @@ class CPDF_CMap : public Retainable {
std::vector<CodeRange> m_MixedFourByteLeadingRanges;
std::vector<uint16_t> m_DirectCharcodeToCIDTable;
std::vector<CIDRange> m_AdditionalCharcodeToCIDMappings;
- const FXCMAP_CMap* m_pEmbedMap;
+ UnownedPtr<const FXCMAP_CMap> m_pEmbedMap;
};
#endif // CORE_FPDFAPI_FONT_CPDF_CMAP_H_