Use CIDSet arguments in CPDF_FontGlobal methods.
Stop short of making CIDSet a full-up enum class, but constrain
the values in places where only a CIDSet is expected.
Change-Id: Ifa4d79b6c1459d2b9523190b7337beb5165a030e
Reviewed-on: https://pdfium-review.googlesource.com/c/pdfium/+/80834
Reviewed-by: Lei Zhang <thestig@chromium.org>
Commit-Queue: Tom Sepez <tsepez@chromium.org>
diff --git a/core/fpdfapi/font/cpdf_fontglobals.h b/core/fpdfapi/font/cpdf_fontglobals.h
index c09f29c..0879829 100644
--- a/core/fpdfapi/font/cpdf_fontglobals.h
+++ b/core/fpdfapi/font/cpdf_fontglobals.h
@@ -35,16 +35,16 @@
CFX_FontMapper::StandardFont index,
const RetainPtr<CPDF_Font>& pFont);
- void SetEmbeddedCharset(size_t idx, pdfium::span<const FXCMAP_CMap> map) {
+ void SetEmbeddedCharset(CIDSet idx, pdfium::span<const FXCMAP_CMap> map) {
m_EmbeddedCharsets[idx] = map;
}
- pdfium::span<const FXCMAP_CMap> GetEmbeddedCharset(size_t idx) const {
+ pdfium::span<const FXCMAP_CMap> GetEmbeddedCharset(CIDSet idx) const {
return m_EmbeddedCharsets[idx];
}
- void SetEmbeddedToUnicode(size_t idx, pdfium::span<const uint16_t> map) {
+ void SetEmbeddedToUnicode(CIDSet idx, pdfium::span<const uint16_t> map) {
m_EmbeddedToUnicodes[idx] = map;
}
- pdfium::span<const uint16_t> GetEmbeddedToUnicode(size_t idx) {
+ pdfium::span<const uint16_t> GetEmbeddedToUnicode(CIDSet idx) {
return m_EmbeddedToUnicodes[idx];
}