summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/font_int.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-05 14:31:12 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-05 22:09:54 +0000
commitab20404199d3897f753861413014be28d259a6cc (patch)
tree8a6701159298db3cbe4391d0ec12677478e2a215 /core/fpdfapi/font/font_int.h
parent60cc3baa05136bccf5d77e0b2cf3000817915bcd (diff)
downloadpdfium-ab20404199d3897f753861413014be28d259a6cc.tar.xz
Split out CPDF_CMap::m_pLeading into separate members.chromium/3093chromium/3092
Avoid casting willy-nill over uint8_t*s, since there's at least one place where the wrong cast could be applied. Use std::vector<> as well. Use ByteRange struct to avoid the seg[i * 2 + 1] anti-pattern. Change-Id: I9278ccc3a545b2640f0daf101a0c8b1d5c5564f8 Reviewed-on: https://pdfium-review.googlesource.com/5012 Commit-Queue: Tom Sepez <tsepez@chromium.org> Reviewed-by: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/font_int.h')
-rw-r--r--core/fpdfapi/font/font_int.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/fpdfapi/font/font_int.h b/core/fpdfapi/font/font_int.h
index 72c892fbbd..f434f2b41d 100644
--- a/core/fpdfapi/font/font_int.h
+++ b/core/fpdfapi/font/font_int.h
@@ -81,8 +81,8 @@ class CPDF_CMap : public CFX_Retainable {
bool bPromptCJK);
void LoadEmbedded(const uint8_t* pData, uint32_t dwSize);
- bool IsLoaded() const;
- bool IsVertWriting() const;
+ bool IsLoaded() const { return m_bLoaded; }
+ bool IsVertWriting() const { return m_bVertical; }
uint16_t CIDFromCharCode(uint32_t charcode) const;
int GetCharSize(uint32_t charcode) const;
uint32_t GetNextChar(const char* pString, int nStrLen, int& offset) const;
@@ -102,8 +102,8 @@ class CPDF_CMap : public CFX_Retainable {
CIDSet m_Charset;
CodingScheme m_CodingScheme;
int m_Coding;
- int m_nCodeRanges;
- uint8_t* m_pLeadingBytes;
+ std::vector<bool> m_MixedTwoByteLeadingBytes;
+ std::vector<CodeRange> m_MixedFourByteLeadingRanges;
std::vector<uint16_t> m_DirectCharcodeToCIDTable;
std::vector<CIDRange> m_AdditionalCharcodeToCIDMappings;
const FXCMAP_CMap* m_pEmbedMap;