summaryrefslogtreecommitdiff
path: root/core/fpdfapi/font/font_int.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2017-05-05 10:38:06 -0700
committerChromium commit bot <commit-bot@chromium.org>2017-05-05 21:04:20 +0000
commit32f2087020642661e12b05c1cfba02ca32c04ee4 (patch)
tree2b3aafe54e97396739ffe36b7425d9ce757a635e /core/fpdfapi/font/font_int.h
parent9bdbc16e3c8f30e32a1f399543d04ac5b1e9c97c (diff)
downloadpdfium-32f2087020642661e12b05c1cfba02ca32c04ee4.tar.xz
Make CPDF_CMap::m_pMapping use std::vector
Use much longer descriptive identifiers while at it. Pack a little tighter while at it, too. Change-Id: I123025f6433a627b5e00ee225efa7dc843b07913 Reviewed-on: https://pdfium-review.googlesource.com/5011 Reviewed-by: Lei Zhang <thestig@chromium.org> Commit-Queue: Tom Sepez <tsepez@chromium.org>
Diffstat (limited to 'core/fpdfapi/font/font_int.h')
-rw-r--r--core/fpdfapi/font/font_int.h18
1 files changed, 10 insertions, 8 deletions
diff --git a/core/fpdfapi/font/font_int.h b/core/fpdfapi/font/font_int.h
index 8bf7ef5594..72c892fbbd 100644
--- a/core/fpdfapi/font/font_int.h
+++ b/core/fpdfapi/font/font_int.h
@@ -97,15 +97,15 @@ class CPDF_CMap : public CFX_Retainable {
~CPDF_CMap() override;
CFX_ByteString m_PredefinedCMap;
+ bool m_bLoaded;
bool m_bVertical;
CIDSet m_Charset;
- int m_Coding;
CodingScheme m_CodingScheme;
+ int m_Coding;
int m_nCodeRanges;
uint8_t* m_pLeadingBytes;
- uint16_t* m_pMapping;
- bool m_bLoaded;
- std::vector<CIDRange> m_AddMapping;
+ std::vector<uint16_t> m_DirectCharcodeToCIDTable;
+ std::vector<CIDRange> m_AdditionalCharcodeToCIDMappings;
const FXCMAP_CMap* m_pEmbedMap;
};
@@ -134,9 +134,11 @@ class CPDF_CMapParser {
~CPDF_CMapParser();
void ParseWord(const CFX_ByteStringC& str);
- bool HasAddMaps() const { return !m_AddMaps.empty(); }
- std::vector<CPDF_CMap::CIDRange> TakeAddMaps() {
- return std::move(m_AddMaps);
+ bool HasAdditionalMappings() const {
+ return !m_AdditionalCharcodeToCIDMappings.empty();
+ }
+ std::vector<CPDF_CMap::CIDRange> TakeAdditionalMappings() {
+ return std::move(m_AdditionalCharcodeToCIDMappings);
}
private:
@@ -153,7 +155,7 @@ class CPDF_CMapParser {
int m_CodeSeq;
uint32_t m_CodePoints[4];
std::vector<CPDF_CMap::CodeRange> m_CodeRanges;
- std::vector<CPDF_CMap::CIDRange> m_AddMaps;
+ std::vector<CPDF_CMap::CIDRange> m_AdditionalCharcodeToCIDMappings;
CFX_ByteString m_LastWord;
};